Search Unity

Follow Camera with Rigid Body - Jitter

Discussion in 'Cinemachine' started by evyatron, Aug 2, 2019.

  1. evyatron

    evyatron

    Joined:
    Jul 20, 2014
    Posts:
    132
    Hello,

    I'm having issues with a follow camera jitter.
    My setup is:
    1. Unity 2019.2.01.
    2. Cinemachine 2.3.4.
    3. Player - has a rigid body, with Interpolation ON. I move it by setting the rigidBody.velocity in the Update method on each frame (according to the input).
    4. Camera - using Smart Update, 0 dead zone, always tracking the player.

    Whenever the player moves the camera jitters.
    I'm pretty sure it's not the player that jitters. What I tested:
    1. Open up the scene view and Follow the player. When I do that the Scene camera follows the player smoothly (indicating to me the player movement is fine), however the Camera gizmo jitters.
    2. Turn OFF Interpolation - that fixes it, however I need interpolation as I'm changing the timeScale.
    3. Changing the camera mode to Fixed Update or Late Update - none worked, all behave the same as Smart Update.

    Also worth mentioning that as soon as I turn Interpolation off the jitter is gone.

    I read this thread which seems to point to the exact issue, however that doesn't work for me:
    https://forum.unity.com/threads/cinemachine-jittering-when-following-vehicle.551944/

    Looking at the release notes, there's this
    "Bugfix: smart update tracks the targets more efficiently and correctly, and supports RigidBody interpolation (2018.2 and up)".

    Could what I'm seeing be a regression?


    Thank you,

    Ev
     
    LuckyMisterSleven likes this.
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Can you make a small demo project that shows this problem and send it to me?
     
  3. LuckyMisterSleven

    LuckyMisterSleven

    Joined:
    May 20, 2014
    Posts:
    2
    Im facing same problem.
    Did you find a solution??
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    If you could set up a small repro project and DM it to me, that would be very helpful, and perhaps we can make some progress towards helping you with this issue.