I ve got a basic key frame animation (using animation component, legacy rig). I need to be able to dynamically change its play speed. For input I have current time value of the anim (normalized). I ve been trying to use animation.sample as it sounds appropriate, and it does work when called once, but doesnt work if called on update ( Id guess the mesh is qued to update next frame, but since im calling it every frame it does nothing till its stopped being called).
my current code
foreach (AnimationState state in animRef)
{
state.enabled = true;
state.weight = 1;
state.normalizedTime = TimeAlpha;
animRef.Sample();
state.enabled = false;
}
is there something i can add to force the update or another way achieving this goal
thanks in advance