KybernetikGames / animancer

Documentation for the Animancer Unity Plugin.
63 stars 8 forks source link

Animation playing in reverse #324

Closed wrymn closed 7 months ago

wrymn commented 8 months ago

For some reason, my animation plays in reverse, this never happened.

This is how I play the animation clip:

AnimancerState state = animator.Layers[1].Play(riseClip);
state.Time = 0;

In the editor I did a pause, and you can see I tried moving slider to the end image

notice the transform values image

and now notice the animation that is being played, the starting keyframes: image

the values from animations first frame are same as animancer is sampling at the end of animation, however the animation ending keyframes are 0 for everything. It seems even the coordinates are reversed, as animation starting keys have positive values for vector 3, but the sampled values have negative.

So what animancer is doing, that it seems its playing the requested animation from reverse for some reason (even though time ticks forward in AnimancerComponent)

Why is that? There is nothing else setting or controlling this layer.

The animation plays correctly in the unity animation window preview.

KybernetikGames commented 8 months ago

I haven't seen behaviour like you're describing before, but having nothing playing on the Base Layer and having Layer 1 set to Additive means you're adding it to nothing. I'm not sure what that should actually do but I'd recommend trying it on a regular Override layer to see if it behaves differently.

Otherwise, feel free to send your animation and model to animancer@kybernetik.com.au so I can take a look at it.

wrymn commented 7 months ago

I haven't seen behaviour like you're describing before, but having nothing playing on the Base Layer and having Layer 1 set to Additive means you're adding it to nothing. I'm not sure what that should actually do but I'd recommend trying it on a regular Override layer to see if it behaves differently.

Otherwise, feel free to send your animation and model to animancer@kybernetik.com.au so I can take a look at it.

You are correct, having that layer additive caused the animation to play in reverse. So this still seems like a bug, as it does not make sense, but for now I fixed it by not having 2nd layer as additive, but as override.