I am making a space game. The player controls a Ship, which has a RigidBody and is affected by physics, so we move it in FixedUpdate. I am using Cinemachine. I have a CinemachineBrain and a CinemachineVirtualCamera in the scene (both are root objects). The VirtualCamera Body has a Transposer set to “Lock to Target” with some damping, and the Aim has a Composer with some damping too. The targets are child objects of the Ship GameObject, so they move with it.
My problem is that from time to time the camera blinks, as if it didn’t move for one frame (for one frame, the camera is suddenly meters behind the target). It will range from once every few minutes to more than times per minute, depending on the PC (we are targeting Windows, but this happens in both Unity Play Mode and standalone build).
The ship moves fairly fast, at 150 units per second. I tried many different “Update Method” combinations, and setting the Update Method to Smart Update or Fixed Update is what works best (it still blinks from time to time though). I see no difference between the Blend Update Method settings (blend method is set to Cut).
Another detail: when there is a collision with the Ship, it jitters crazily for a few seconds.
If I swap the CinemachineVirtualCameras for a regular Unity Camera, or simply remove the Transposer and Composer from the CinemachineVirtualCamera, the blinking stops.
So, how do I fix this? Am I missing something? What is the right combination of settings? Does the RigidBody interpolating/extrapolating make a difference?
Thank you so much for your time!