Search Unity

Match two FreeLook Cameras orbit values when blending

Discussion in 'Cinemachine' started by ZigZagZat, Mar 24, 2021.

  1. ZigZagZat

    ZigZagZat

    Joined:
    Mar 6, 2021
    Posts:
    12
    My players camera needs to behave differently based on what he is doing. For example, if he is aiming it blends to another freelook camera. However, it has a different position on the orbit to the camera that was previously in use, making the camera move along the orbit when it blends.

    How can I stop this from happening? I have tried setting the axis values to be the same as the currently active freelook camera but I cannot figure out how to get the currently active freelook camera:
    Code (CSharp):
    1. CinemachineCore.Instance.GetActiveBrain(0).ActiveVirtualCamera
    only gets a virtualcamera.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Try this:

    upload_2021-3-24_9-21-46.png
     
  3. ZigZagZat

    ZigZagZat

    Joined:
    Mar 6, 2021
    Posts:
    12