Cinemachine Jitter When Multiple Targets Move in Sync - Local 2D Multiplayer

Hi,

I have a top-down 2D game setup, with local multiplayer (2 players). I would like to have a cinemachine that follows the center of both players as a target group, however I am encountering this ever-persistent jitter whenever both players move together along the same direction.

Here’s the link to a clip I took demonstrating the jitter. This is in build btw:

I have scoured through all related posts, and I have made sure that

  1. Movement control for both characters are in FixedUpdate and FixedUpdate only (via setting rigidbody2D.velocity);
  2. Interpolate field for the rigidbodies are checked; and
  3. Brain’s Update method is checked as FixedUpdate.

What I can’t get over is that the jitter only occurs when camera and both characters are moving in the same direction; as soon as one deviates from that direction jitter disappears. I then suspected whether it could be the characters moving too fast, but again looking at related posts it seems this shouldn’t be a issue, especially when all damping are set to zero.

I can’t really figure out what might be missing here. Any pointers on the issue would be appreciated, thanks :slight_smile:

Change your Brain’s update mode to SmartUpdate or LateUpdate.

The reason is that with Interpolation enabled, the physics system is poking the Rigidbody’s transform every frame with a value appropriate for the current frame time. That’s a good thing. It means that the cameras and target groups can treat the targets as if they’re being updated in Update rather than FixedUpdate.

You can check that interpolation is working by putting the Brain in SmartUpdate and looking at the vcam’s transform while the game is playing. It will show you which update method is being chosen for that camera, based on how it has detected motion in the target:

Also make sure that the TargetGroup is being updated in LateUpdate:

1 Like

This solved my problem perfectly. Thank you for your clear explanations!

1 Like