[SOLVED] How to set currentTime


Is there any way to play animation from the middle by setting currentTime? I tested it here:

but it always plays from the beginning and it seems that the currentTime value does not change at all while the animation is playing and speed = 0 does not pause the animation.

What I really want to do is set currentTime and pause the animation at that position.

Would you take a look?

Thank you,

You have to play the animation on the animation component first and then change the current time on the animation component rather than the animation asset: https://playcanvas.com/editor/scene/578270

I’ve done a similar project where the user can scrub through an animation here for more reference: https://playcanvas.com/editor/scene/527695

Yes, it works! Thank you so much.