Godot: AnimationPlayer signals are not emitting when animations played from AnimationTree

Created on 22 Apr 2019  路  12Comments  路  Source: godotengine/godot

Godot version:
3.1 stable

OS/device including version:
Windows 10 Pro 1809

Issue description:
AnimationPlayer animations signals are not firing when animation played from within any AnimationTree node. I assume this is a bug, since AnimationPlayer directly attached to AnimationTree and AnimationTree doesn't have it's own signals controlling animation flow, so if tree is complex enough it becomes impossible to control it without signals.
I'm very confised since it is very important part of functionality but I couldn't find anyone bothered by its absence so I thought maybe I'm misunderstanding something, but couldn't find any solution so far.

8521

Steps to reproduce:
Create (looping or not) animation in AnimationPlayer.
Create AnimationTree, assign AnimationPlayer to it. Inside AnimationTree (AnimationNodeBlendTree for ex) create Animation Node and connect it to output or any other combination. Activate AnimationTree, run.

Minimal reproduction project:
Test.zip
Enabling "autostart" on timer will allow signals emitting, since animations played directly from AnimationPlayer, indicating that it is perfectly fine by itself.

bug core

Most helpful comment

I'm having this same problem in godot 3.2

All 12 comments

I had the same problem. I solved it by adding a callback in the animation. In your animation add the track for functions callback. Then you set the track key, and specify the name of the callback.

I had the same problem. I solved it by adding a callback in the animation. In your animation add the track for functions callback. Then you set the track key, and specify the name of the callback.

Yeah, I did it too, but the problem here is if function key too close to 0 or end of animation - it is sometimes not triggering so you have to move it +/- dozen milliseconds on animation timeline which makes timing animation even more cumbersome, even though I used the most simple animations, without any blending or time scaling/seeking.

I can confirm this bug is present on Linux as well (Manjaro).

Unfortunately, the above workaround is not possible for me, since the function I need to call is in a script attached to an AnimationNode inside the AnimationTree. When creating a call method track, you can only select nodes which are displayed in the scene dock, and AnimationNodes inside an AnimationTree are not displayed.

I'm having this same problem in godot 3.2

@mateusbds https://github.com/godotengine/godot/pull/30508 might be of interest to you.

Same problem for me...

Same here

Seeing this issue atm as well.

Also having this issue, but this workaround worked like a charm for my use case (adding call method tracks to the animation(s) in question): https://amp.reddit.com/r/godot/comments/7lsrga/animationtreeplayer_detecting_when_an_animation/

Is it intended action?

Just hit this as well. The explicit "Call Method Track" to a node won't work for my specific use case as the target is dynamically created by a GdNative library.

Same issue. Resolved it by using timers and setting wait_time to animation length, but it's a very makeshift solution.

Was this page helpful?
0 / 5 - 0 ratings