• International中文
  • Spine-ue4 动画播放结束事件响应错误

Spine-ue4 版本 4.1.00,ue4 版本 4.27.2

非循环动画播放完成后没有触发 AnimationEnd 事件,
当我改成 AnimationComplete 事件后才可以正常触发。
根据 Spine-ue4 文档的描述,AnimationEnd 可以响应动画播放中断或非循环动画播放完成,与预期不符。
请解答我的疑惑,谢谢!

Related Discussions
...

这有点违反直觉,但它按预期工作。 仅当不再应用动画时才会触发动画结束事件。 但是,即使在非循环动画的情况下,动画的最后一帧也将无限期地应用,直到通过排队新动画将动画从轨道“删除”。

您可以通过将“AddAnimation”节点返回的轨道条目的“trackEnd”值设置为动画持续时间来更改此行为。

http://en.esotericsoftware.com/spine-api-reference#TrackEntry-trackEnd

This is a little counter intuitive, but it works as intended. The animation end event is only triggered if the animation is no longer applied. However, even in case of an un-looped animation, the animation's last frame will be applied indefinitely until the animation is "removed" from the track by queueing a new animation.

You can change this behaviour by setting the trackEnd value of the track entry returned by the AddAnimation node to the animation duration.

http://en.esotericsoftware.com/spine-api-reference#TrackEntry-trackEnd