I have 2 “Free Look” cameras in my scene that I’m trying to switch between. They are both almost identical, with the only difference being the “Y Axis” value (0 vs 1). I need extra control for the cameras, so I need to have 2 of these.
When the “X Axis” value of these cameras is 180 and I activate the higher priority camera, there seems to be a gimbal locking problem where there is noticeable jitter in the camera for 1 frame. This can also be seen in the editor as the Z position suddenly changes for 1 frame, before continuing as I would expect.
This does not occur when disabling the higher priority camera and it also does not occur when the “X Axis” value is 0. This does seem to happen only with values near 180 for the “X Axis”.
Here is a sample project I created with just the two cameras in a scene. The jitter is hard to notice in this lightweight project, but it does exist. The Z position changing in the editor is easier to observe. Just enable/disable the higher priority camera.
https://drive.google.com/file/d/11M-FpFawZKCJX92_R2ow_LY0FZUDov5X/view?usp=sharing
I am on Unity 2020.3 and I am using the latest version of Cinemachine.
Is this a known issue, do I have my cameras set up incorrectly, or is there a workaround? Thanks!