Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AUX mode to the AnimationPlayer to make the AnimationPlaybackTrack be blendable like the AudioTrack #8783

Open
TokageItLab opened this issue Jan 3, 2024 · 1 comment
Milestone

Comments

@TokageItLab
Copy link
Member

TokageItLab commented Jan 3, 2024

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() and seek() 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

@ScribblesandFlapjacks
Copy link

This feature is sorely needed for 3d to 2d animation workflows especially given that the GPU particle rework was in the same version that AnimationPlaybackTrack could no longer be scrubbed through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants