Play Morph Target animation in reverse

Hello.

I’m using gltf library to load and play morph target animation (https://github.com/playcanvas/playcanvas-gltf). At this point I’m wondering is it possible to play animation in reverse or even blend current state to reversed animation state.

I have just one animation I want to use to make character recoil back and forth, but only able to do it one way, like so:

Oct-29-2019%2010-32-51

But I want also to blend it back to beginning in reverse, and also blend animation state to start what i start walking.

I tried to dig in the code and it seem to me that it’s possible to just blend animation via blending to AnimationClipSnapshot at zero time somehow, but i’m not sure how to do that.

Anyone able to give me a hint?

Thanks.

have you seen this? Playing Animation in Reverse

Nope. Sorry for double posting. Should’ve search the forum. Thanks!

Actually, @ayrin, I wasnt paying attention earlier. As I said in start post, it’s about gltf animations, and pointed thread though helpful is about regular PC animations. So question still stands.

It seems that the playcanvas-gltf loader includes functions to fully control the animation (even blend, linear, toTarget etc):

I haven’t used it myself, you can explore the source code of the viewer on how to use/interact with the API:

Can you try this?

viewer.gltf.animComponent.animClips[0].bySpeed = -1