How to prevent jittering when using cinemachine 3.0 and dampening in third person follow?

Hi,

  • My player is moved using rigidbody.addVelocity and the like. These calls are all happening in FixedUpdate();
  • The parent object is rotated via rigidbody.MoveRotate() in FixedUpdate()
    • My aim target (child of parent) is rotated via transform.rotation in FixedUpdate()
  • Cinemachine Camera says Position Control: Third person Follow
  • Cinemachine Camera says Rotation Control: Rotate with follow target
  • Update Method: Late Update
  • Blend Update Method: Late Update
  • EDIT: my rigidbody is interpolated

Everything looks smooth, but the moment i turn on dampening it starts jittering. Whats going on?

That’s a very strange setup. What are you trying to achieve? If it’s a third-person camera, then here is a good tutorial that you can follow:

For the jitter: you’re playing with fire if you mix RB movement and transform movement… interpolation will probably not be compatible with your setup. Probably the transform of the child object is not smoothly attached to the parent object because of this mixing. Do everything via Rigidbody API, never touch the transform.

That tutorial is for Cinemachine 2.0 and i havent found any “rotation control” in the video. What exactly is wrong with that? I was also able to turn off the rotation control and then it still works as expected.

I found the issue:

  • I was moving my playere using RG api only, but still had jitters
  • I added a simple capsule to my player and this capsule did not get jittering
  • I disabled the animator and then also had no jittering
  • → changing the animator to use “Update Mode: Fixed” fixed the jittering
1 Like

Yes, it’s for CM2, but it translates easily to CM3 - just some names and inspectors are a little different, but the concepts are all the same. With the 3rdPerson paradigm, rotation is handled by the character controller, not by CM. This is to ensure that camera aim and player aim always match.

You can take a look at the ThirdPersonWithAimMode sample scene that ships with CM3 for a sample controller that does the right stuff.

To help with the tutorial, you can look at the CM2-to-CM3 upgrade guide: Upgrading a Project from Cinemachine 2.X | Cinemachine | 3.1.2