You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably the most commonly used signal from the AnimationPlayer (at least in my experience) is "animation_finished(anim_name: StringName)". Unfortunately, using an AnimationTree blocks the use of this signal (and I am guessing the others). This is unexpected and unintuitive - the AnimationTree is a powerful tool, and it is surprising to see that using it actually removes basic functionality of the AnimationPlayer.
There are certainly workarounds. One can add a function call to the animation track to serve the same purpose. However, if you are regularly re-importing assets and animations, configuring this every time is cumbersome, especially for many animation tracks. Another option is to use a OneShot node in a BlendTree inside your AnimationTree, so you can check if its active - but this is also cumbersome and needlessly complex, as you have to add a dummy animation for the OneShot to work with in every such case. There are probably other approaches, and I'd welcome suggestions.
This is all hinted at in the documentation, but its description doesn't really explain the extent of the limitations: "Note: When linked with an AnimationPlayer, several properties and methods of the corresponding AnimationPlayer will not function as expected. Playback and transitions should be handled using only the AnimationTree and its constituent AnimationNode(s). The AnimationPlayer node should be used solely for adding, deleting, and editing animations." That's partly why I submitted this as a bug report.
IMO it would be more intuitive to retain the basic functionality of the AnimationPlayer in some capacity in the AnimationTree, even if that means adding nodes or functionality to existing nodes (like Seek) such that these signals can be used.
Steps to reproduce
Add animations to an AnimationPlayer
Add an AnimationTree and set its anim_player to the AnimationPlayer
This is all hinted at in the documentation, but its description doesn't really explain the extent of the limitations
AFAIK, AnimationTree uses the AnimationPlayer as the container of animations. An AnimationTree plays / blends the animations on its own, i.e. the AnimationPlayer does not play anything, thus no signals are emitted.
Godot version
4.0 Beta 8
System information
Windows 10/11
Issue description
Probably the most commonly used signal from the AnimationPlayer (at least in my experience) is "animation_finished(anim_name: StringName)". Unfortunately, using an AnimationTree blocks the use of this signal (and I am guessing the others). This is unexpected and unintuitive - the AnimationTree is a powerful tool, and it is surprising to see that using it actually removes basic functionality of the AnimationPlayer.
There are certainly workarounds. One can add a function call to the animation track to serve the same purpose. However, if you are regularly re-importing assets and animations, configuring this every time is cumbersome, especially for many animation tracks. Another option is to use a OneShot node in a BlendTree inside your AnimationTree, so you can check if its active - but this is also cumbersome and needlessly complex, as you have to add a dummy animation for the OneShot to work with in every such case. There are probably other approaches, and I'd welcome suggestions.
This is all hinted at in the documentation, but its description doesn't really explain the extent of the limitations: "Note: When linked with an AnimationPlayer, several properties and methods of the corresponding AnimationPlayer will not function as expected. Playback and transitions should be handled using only the AnimationTree and its constituent AnimationNode(s). The AnimationPlayer node should be used solely for adding, deleting, and editing animations." That's partly why I submitted this as a bug report.
IMO it would be more intuitive to retain the basic functionality of the AnimationPlayer in some capacity in the AnimationTree, even if that means adding nodes or functionality to existing nodes (like Seek) such that these signals can be used.
Steps to reproduce
Minimal reproduction project
AnimationTreeStateMachineRoot.zip
The text was updated successfully, but these errors were encountered: