Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Cinemachine FreeLook Camera Horizontal Movement

Discussion in 'Cinemachine' started by L_stro, Mar 13, 2021.

  1. L_stro

    L_stro

    Joined:
    Mar 13, 2021
    Posts:
    4
    Hello,
    currently I'm trying to create a camera that orbits around an object the player can move. I created a Cinemachine FreeLook Camera that follows and looks at that FollowObject and implemented the user input. In order to move the object horizontally, seen from the player's perspective, I let the programm calculate the Vector3 that points in the correct direction (using the FollowObject's and FreeLook Camera's position).

    But this FollowObject is orbiting around my FreeLook Camera. It's as if the FreeLook Camera isn't following the FollowObject accurately.
    How can I make the FollowObject make move horizontally, seen from the player's perspective (which is the FreeLook Camera's perspective)?
    If somebody knows a solution to this or even a better approach, I'd be very happy to hear it.

    Thank you!
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Try changing the FreeLook's Binding Mode to World Space:

    upload_2021-3-13_8-6-5.png
     
    Mc_Patoo, talha-safdar and L_stro like this.
  3. L_stro

    L_stro

    Joined:
    Mar 13, 2021
    Posts:
    4
    Thank you! Works perfectly now! Thanks for the quick response!
     
    Gregoryl likes this.
  4. Mc_Patoo

    Mc_Patoo

    Joined:
    Jul 13, 2023
    Posts:
    2
    Thanks :D