I have some problem with animation synchronization: it is sligthly trembling.
I can’t reproduce it in examples, probably this trembling is just too small.
Consider the following scene: Character is moving forward (in X+ direction) with walk animation (with e.g. Period=1), camera is static.
Chrarcter is moving forward during fixed update
It is obvious that animation time and character position are connected: time = fract(X/speed)
Let’s take a look on timing:
FixedUpdate times are incremented every 1/60 second:
[0; 0.0166; 0.0333; 0.05; 0.0666; 0.0833; ...]
Chrarcter’s X positions are incremented every 1/60 second too:
[0; 0.1; 0.2; 0.3; 0.4; 0.5; ...]
Example frame times:
[0; 0.021; 0.04; 0.059; 0.082; ...]
Frame at 0.04 is rendered in the following way:
Character is at X=0.2 (this position was set during fixed update at 0.0333)
So, character’s “true” animation time is 0.0333 (see formula above).
But animtion is updated during non-fixed update, so real animation time is 0.04.
So, animation gets non-synchronized, and small trembling is visible when foot is grounded.
Any ideas how to synchronize animations? Let’s suppose that I can’t make updates non-fixed.
I’ve temporarily made animation update during fixed update too, but it is not the best solution IMO.