Search Unity

Jitter when transitioning between different angled VCams following a physics-driven target.

Discussion in 'Cinemachine' started by adamgryu, Jan 22, 2019.

  1. adamgryu

    adamgryu

    Joined:
    Mar 1, 2014
    Posts:
    187
    Hi there!

    I have two VCameras following the same target - which is driven by rigidbody movement.

    The VCams follow the target at different angles. When the target moves from one region to the next, it transitions from one angle to another.

    I've noticed that even with SmartUpdate, I get visible jitter on cameras when they are transitioning and rotating at the same time. It's subtle but it's definitely there.

    My theory is that this occurs because the VCams are each updating only on the FixedUpdate loop, however, the ActiveBlend is always advanced during the LateUpdate loop.

    If the physics is running at 30FPS and the game is running at 60FPS, then there will be at least 1 render frame between 2 physics frames, where the active blend is advanced but both VCams haven't actually moved since the last render frame. This causes a slight jitter since during the off-frames, the blend is advancing with outdated VCam information.

    In an older project of mine, I hacked a solution by moving the ActiveBlend increment into the fixed update loop. However, this was tricky to get working well and makes it difficult to update Cinemachine.

    Is there a way to solve this without modifying the Cinemachine source code? Is there already a bug filed for this problem?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Thanks for this description. We weren't aware of this problem. If you could file a bug report, with a reliable repro case, we will be able to queue up a fix for it.
    Thanks.
     
  3. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,011
    @Gregoryl I definitely suffurs this issue. Minimum reproducible project is sent as Case 1158509.
     
    Gregoryl likes this.
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    @Kichang-Kim Thank you for filing that bug. The issue has been fixed and the fix will be in the next CM release.
     
    Kichang-Kim likes this.