How to set anim state speed?

I’m try to set speed number to -1 ,but it’s not working
script from tutorial:Starter Kit: Model Viewer,I made some modifications according to my ideas.I want to invert it on an animation.
project link:PlayCanvas 3D HTML5 Game Engine

Looks like a bug. Created a ticket for this: assignAnimation() speed is not always applied correctly when animating · Issue #5314 · playcanvas/engine · GitHub

Is there any other way to set the speed of the state?

You can set the speed on the anim component

okay,thanks for your reply

I think I got a fix for the bug in a PR. If it passes review, it should be in the next patxh release of the engine.

I think the easiest way around this is to use a Anim State Graph but with no transitions like this

But still use the transition API to jump between the states.

Oh, yes! I tried your solution yesterday, which can solve the problem I am currently facing on my demo. Due to being busy yesterday, I forgot to reply to you. Thank you very much for your reply

1 Like