Search Unity

Bug Was there a change in transitions with a roll of Z Axis (dutch)?

Discussion in 'Cinemachine' started by AquaGhost, Mar 28, 2023.

  1. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    I just updated my unity version and I have a few areas with transitions that are done with the standard overlapping of CM cameras. They were fine in 2022.1.5 version.
    However, in the new unity 2022.1.24, everything transitions, but the Z rotation values just snap at the end of the transition period. IE, they dont transition like the other rotation values.
    I thought this was maybe a CM package issue, but if i update the old unity to a new CM package, it doesn't have the issue.
    If I change the method to using the Dutch value instead of the Z, it works.
    However, this seems like a bug, because the way one would normally move cameras around to set them up is via the rotation handles, or in some cases a virtual capture. Its a pain to get the Z like you want it, and then have to go do the same thing in Dutch.
    Is this a known bug?
     
  2. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    189
    Heyyoo :)
    What version of Cinemachine did you use? Before and after updating the package?
     
  3. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    Unity 2022.1.5 we do NOT have this issue w CM 2.8.6 and also tried 2.9.0-pre6, still no prob.
    Unity 2022.1.24 we DO have this issue w CM 2.8.9
    Unity 2022.2.7 we DO have this issue with cm 2.9.5
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    @AquaGhost Can you show images of the vcam inspectors in question?
     
  5. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    Here they are. The first camera overlaps the second on the inspector like this. It snaps in just the roll (z rot) after the transition period, when it just becomes cam 2 at the arrow.

    Cam1:


    Cam 2:


     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    What happens if you set the LookAt target in the vcams to null?
     
  7. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    If I turn it to null on the second camera, it doesn't do the jump. First camera doesn't seem to affect it.
    Im using that lookAt field in order to do the DOF though. Is this a newly introduced bug since it wasn't doing it in the prev version?
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    I managed to reproduce the issue. Thanks for bringing it up. It seems there was a recent regression in CM. We will fix it and release an updated version.
     
  9. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    As a temporary fix, you can add this extension to your problem vcams.
    Code (CSharp):
    1. using Cinemachine;
    2. using UnityEngine;
    3.  
    4. [ExecuteAlways]
    5. public class IgnoreLookAtTarget : CinemachineExtension
    6. {
    7.     /// <summary>Standard CinemachineExtension callback</summary>
    8.     protected override void PostPipelineStageCallback(
    9.         CinemachineVirtualCameraBase vcam,
    10.         CinemachineCore.Stage stage, ref CameraState state, float deltaTime)
    11.     {
    12.         if (stage == CinemachineCore.Stage.Finalize)
    13.             state.BlendHint |= CameraState.BlendHintValue.IgnoreLookAtTarget;
    14.     }
    15. }
    16.  
    17.  
     
    antoinecharton likes this.
  10. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    Ok great, I tested that and it works. Thanks for that workaround.
     
    antoinecharton and Gregoryl like this.
  11. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    We have a fix, it should ship with 2.9.6
     
  12. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    Ok great, we will look for it!