Godot: A way to check if an animation has been finished on AnimationTreePlayer

Created on 24 Apr 2017  路  4Comments  路  Source: godotengine/godot

Operating system or device - Godot version:
Linux 4.1 - 2.1.3

Issue description:
I need a way to check if an animation has finished, so i can switch a state on my character

enhancement junior job core

Most helpful comment

It's probably a good idea for the AnimationTreePlayer to have similar signals to AnimationPlayer

All 4 comments

It's probably a good idea for the AnimationTreePlayer to have similar signals to AnimationPlayer

If I remember correctly it is planned to rework AnimTreePlayer?

for now it's still valid in 3.0.2.
Workaround for this would be to

yield(get_tree().create_timer(animationPlayer.get_animation("animation_name").length), "timeout")
//animation is finished here

AnimationTreePlayer is deprecated in Godot 3.1 and will be removed in Godot 3.2. It is replaced by AnimationTree, which was written from scratch and likely fixes/deprecates this issue.

If the issue is still relevant in some form with AnimationTree in Godot 3.1, please open a new issue about it (potentially linking this one if there is relevant discussion to keep track of).

Was this page helpful?
0 / 5 - 0 ratings