Search Unity

Trying to get Free Look to Orbit only on input, otherwise lock orbit

Discussion in 'Cinemachine' started by Orspectral, Nov 17, 2018.

  1. Orspectral

    Orspectral

    Joined:
    Feb 28, 2013
    Posts:
    2
    I have been working on finding a way to get my Free look cam to follow a player object with a locked orbit unless there is input.

    The functionality Im aiming for is the camera to track the player, be it forward/backward, and lateral tracking if strafing, with no orbit, unless the player inputs rotation. What I have now is if the player is strafing the camera will pan to follow the orbit, while the player can input to the orbit.

    I feel like I've missed something obvious, but I'm still new to playing with Cinemachine, any help is appreciated
     
  2. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    70
    You could just use a simple following vcam instead of a freelook one when your character is strafing without rotation input, then blend to a freelook vcam if there is rotation input.
     
    Last edited: Nov 19, 2018
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Sounds like the issue is with your binding mode. Is it set to SimpleFollow? You should instead set it to WorldSpace, or LockToTargetWithWorldUp. That way, the orbit position will stick unless you have user input to change it.