Search Unity

Camera jitter with any damping larger than 0

Discussion in 'Cinemachine' started by cayetanoVL, Oct 29, 2018.

  1. cayetanoVL

    cayetanoVL

    Joined:
    Sep 29, 2016
    Posts:
    5
    Hello!

    I have a very strange jittering/stuttering/vibrations on my virtual camera when I set up the damping to any value that is not 0. The camera is following a ship and as soon as the ship start moving the jitter starts, the faster the ship moves the more jittering I have. Any idea why?

    I already tried to change the update rate in the cinemachine brain but it does not help unless I use the FixedUpdate option. Using the FixedUpdate removes the jittering but all the damping/camera settings no longer work. Reading from other thread it seems this is a known bug and is fixed on the new beta but I don't know where to download it to test it.

    Any help is appreciated.

    Thank you
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    With a text editor edit your project's Packages/manifest.json file and add this line:
    "registry": "https://staging-packages.unity.com",
    immediately before the "dependencies" line. Then open Package Manager, and you will see the experimental and unpublished content in addition to full-fledged releases. Use at your own risk.
     
  3. Weendie-Games

    Weendie-Games

    Joined:
    Feb 17, 2015
    Posts:
    75
    Hi @Gregoryl any chance of the asset store version be updated? Or is possible to download this preview version with 2018 editor and export the package to be imported in a 2017.4 project?
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    You can probably download and use in 2017.4 as you describe. Try it and let us know how it turns out.
     
    Weendie-Games likes this.
  5. Weendie-Games

    Weendie-Games

    Joined:
    Feb 17, 2015
    Posts:
    75
    Done that and is working. Thank you
     
    Gregoryl likes this.
  6. cayetanoVL

    cayetanoVL

    Joined:
    Sep 29, 2016
    Posts:
    5
    Thank you @Gregoryl .

    I've been testing the new version and the jittering problem still happens with our ship. I tried with the Unity car from standard assets and is super smooth so it has to be related on how we update our ship. Any insight on how the damping of the camera works?

    I will be doing a more complete test today recording the path of the objects and replay them to see if it still happens or if is related to the delta distance between frames
     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    @cayetanoVL Damping is sensitive to unsteady framerate, but if you set the brain to FixedUpdate then the framerate is constant from the vcam's perspective. If you still get judder in that case, it could be because:
    • You have RigidBody Interpolation on in the target
    • You are modifying the target's transform in an unsteady way
    • You are modifying the target's transform outside of FixedUpdate (e.g. in Update or LateUpdate)
     
  8. Weendie-Games

    Weendie-Games

    Joined:
    Feb 17, 2015
    Posts:
    75
    In my case the jittering stoped after i updated to the latest version and changed the update mode to FixedUpdate in the cinemachine brain
     
  9. cayetanoVL

    cayetanoVL

    Joined:
    Sep 29, 2016
    Posts:
    5
    Thank you for the details @Gregoryl .

    We have a custom physics engine and it was related to the update rate. I have it working now tied to FixedUpdate.

    Would be great if we could update the brain at demand. I had a look at the code and is possible if I move the package to our assets folder and do some modifications but it's not worth it long term.

    Thanks for the suggestion too @Weendie-Games !
     
    Weendie-Games likes this.