Cinemachine in 2D skipping frames

Hi guys, I have a weird issue where the Cinemachine for 2D camera sometimes skips a few frames. (I followed this blog post: Unity Blog )
See a few seconds after this point in the video, jumping right:

If I use a normal camera with a follow script then it works fine, so I’m not sure what’s happening.
I need Cinemachine because I’m using various of their features. But the sample video is very simple so I’m not sure what could be wrong.

Any advice on how to fix or debug this?
Thanks. :slight_smile:

Camera glitches are often caused by mismatched Update clocks. If your character is using physics, then its transform will by updated in FixedUpdate. In that case, you must ensure that the vcams are also updated on the same clock.

Setting the CM Brain to SmartUpdate will allow it to update the relevant vcams on the same clock as their targets. However, that will only work if the target is consistently animated on one clock. If you mix clocks (i.e. sometimes alter the target’s the transform in FixedUpdate, and sometimes alter it in Update or LateUpdate), that will confuse CM and you will get judder. Check your scripts for clock consistency.

2 Likes

That fixed it, thank you sooo much! :slight_smile:

I had my jump functionality partially in Update instead of FixedUpdate.

1 Like

Hi guys.
I’m experiencing the same glitch only in Editor, on mobile builds camera works as intended.