Add AUX mode to the AnimationPlayer
to make the AnimationPlaybackTrack
be blendable like the AudioTrack
#8783
Labels
Milestone
Describe the project you are working on
Godot Animation features stabilization
Describe the problem or limitation you are having in your project
AnimationPlaybackTrack cannot be blended.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
AnimationPlaybackTrack functions like a simple StateMachine, but it only calls the AnimationPlayer's
play()
andseek()
methods and cannot blend. This causes a limitation as mentioned in godotengine/godot#70338.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
For a long time, this problem was unsolvable, as indicated by the comment in godotengine/godot#70338 (comment). However, AnimationPlayer now inherits AnimationMixer as its base class, which allows for blending equivalent to AnimationTree. So, correct blending should be possible by implementing the ability to manage multiple animations simultaneously in them.
In the case of AudioTrack, the host AnimationTree generates an AudioStreamPolyphony, which is then played back by the AudioStreamPlayer.
In the case of AnimationPlaybackTrack, the host AnimationTree generates a list of AnimationInstances in a similar fashion, and the assigned AnimationPlayer plays them back.
The concern is that the user may manipulate the assigned AnimationPlayer and unintentionally break their playback state. To prevent this, an AUX mode is needed to be implemented to disable some methods while the AnimationPlayer's animation is being played externally.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Never
Is there a reason why this should be core and not an add-on in the asset library?
Animation blending is a core feature
The text was updated successfully, but these errors were encountered: