Search Unity

Cinemachine lock Z axis during transition/blend

Discussion in 'Cinemachine' started by Ksanone, Aug 12, 2021.

  1. Ksanone

    Ksanone

    Joined:
    Feb 7, 2015
    Posts:
    41
    Hi, is there a way to prevent Cinemachine roll/dutch during transitions between camera? I am blending between a

    Free Look cam - follow player, look at player - orbital transposer, aim composer on all rigs
    basic vcam - follow player, look at target group - body framing transposer, aim hard look

    and during the blend there is some very slight Z axis rotation.

    I tried to lock the Z axis with an extension but I had unexpected results.

    Code (csharp):
    1.  
    2. var rot = state.RawOrientation;
    3. rot.z = 0;
    4. state.RawOrientation = rot;
    5.  
     
    Last edited: Aug 12, 2021
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    There was a bug in the blending code that was recently fixed. Try upgrading to the very latest preview version of CM and see if you still have the problem.
     
  3. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724