Answered Timeline animation missing keyframe triggers on low FPS?

atani

Invaluable member
Featured Contributor
Messages
2,487
Reactions
2,338
Points
143
Website
atani12.gitlab.io
I think I am misundertanding a lot of things related to how Timeline animations work and what influences the animation playing, so please bear with me if I'm asking nonsense.

I set triggers on my animation and when on VR (which pummels my FPS because I have a weak GPU) with say less than 14 FPS, ocasionally a trigger in the animation is not executed. The scene is set as "Game time" which is expected to slow down with low FPS:
  • Would the playing "accuracy" of the animation be influenced by FPS, or Physics level, or something else, that would lead to a keyframe being skipped?
  • Would there be something special about a first or last keyframe that could have it skipped because of blending with the next scene?
I don't get on ocasion the same result when testing on desktop or VR, and a marked difference is FPS thus the question that may be nonsense.

Thank you
 
Hi! The keyframe triggers logic is the same as vam animation patterns; every Unity frame, it will evaluate between which keyframes it's currently at. If it's not the same trigger keyframes pair as the Unity frame before, it will "end" the previous trigger and "start" the new one. So yes, if your FPS is low enough is skips the whole range between the two keyframes, the first of the two will be skipped.

For example, you have a keyframe at 1s, 1.1s and 2s. If your computer renders once at 0.9s and then at 1.2s, only the 1.1s keyframe will be evaluated. I considered improving on this but usually you got to have very low keyframes and a very high triggers density to have that issue. It won't skip a trigger in other cases.

As for blending, yes this is absolutely possible. Because of that behavior, you can make absolutely sure a trigger is executed by having two trigger track; one that only has one keyframe, which is guaranteed to be called even if you blend it at half the animation.

Hope that helps :)
 
Upvote 0
Back
Top Bottom