Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Cinemachine zoom to location without moving camera?

Discussion in 'Cinemachine' started by wethings, Jan 4, 2022.

  1. wethings

    wethings

    Joined:
    Aug 26, 2018
    Posts:
    28
    Hi,

    any suggestions on how to zoom a cinemachinec camera based on mouse position without moving the camera position?

    I tried changing follow offset, tracked object offset and screen x/y based on mouse position but that would move the entire camera AND zoom.

    Trying to achieve the zoom like in google maps, where it zooms by offset based on the mouse position?
     
    Last edited: Jan 4, 2022
  2. wethings

    wethings

    Joined:
    Aug 26, 2018
    Posts:
    28
    The solution is in the linked thread, did not make much sense to me at first but that is the approach to take

    https://forum.unity.com/threads/google-maps-like-camera-control.882958/
     
    gaborkb likes this.