playcanvas / engine

JavaScript game engine built on WebGL, WebGPU, WebXR and glTF
https://playcanvas.com
MIT License
9.64k stars 1.34k forks source link

Make anim events fire for reversed anims. #3808

Closed SpotTrace closed 1 year ago

SpotTrace commented 2 years ago

Description

Make anim events work when an animation is running in reverse due to using a negative speed setting.

Steps to Reproduce

In the Animation Events example, if you swap the sign on the speed, the anim events don't fire:

113: modelEntity.anim.assignAnimation("Walk", walkTrack, undefined, -0.62);

mvaligursky commented 2 years ago

forum link https://forum.playcanvas.com/t/anim-events-for-reversed-anims/23346/3