Hello, I'm trying to do a Fighting Game in Unity so I need to have frame by frame logic for animations. I have most of my logic in the FixedUpdate because of that. I'm testing my animations and realise that sometimes there's a 1 frame difference at the end time of the same animation. I don't know if its a frame too much or too little or why it's happening. Naturally doing it in the normal Update the difference was higher.
#1 Frame difference in animations using FixedUpdate
1 messages · Page 1 of 1 (latest)
fixed update isnt tied to your frame rate at all, so it doesnt make sense with "need to have frame by frame logic". the poses in the images are also the exact same, the only difference i see is the frame counter. You should share the logic you're actually doing because there isn't much to go off here
I have an animation playing using Playables:
Every frame of the animation I log something just to see how many frames it took for the animation to complete.
Sometimes I have 20 log entries and sometimes 19. I want to undestand why.
I believe it is tied to the frame rate not the amount of frame of the animation. An animation is not played in a "Frame Basis"
if you set your target frame rate really low, you also should get less logs while an animation still fully plays out over time. you cant rely on the number of frames to do anything
If you're using playables api, don't you need to update the playables graph manually anyway? If you do, I'd assume the issue is there.
And if you're not doing it, then you probably should be doing it if you need such a fine control of the animation state.
Though, do note that you might then have a disconnect between rendering and your animation update causing stutter or jitter like effects.
One of the last examples here "control the timing of the tree" is what you should look at:
https://docs.unity3d.com/6000.1/Documentation/Manual/Playables-Examples.html
Thanks that was the part I was not finding!