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

Fix AnimationPlayer::play() process unwanted start between the same animations #82898

Conversation

TokageItLab
Copy link
Member

@TokageItLab TokageItLab commented Oct 6, 2023

Fixes #82828.

Even when the same animation was played, the started flag was set. This was probably the old behavior.

The rework in #80813 forces the AnimationPlayer to set its internal delta to 0 immediately after start in order to process the first frame (to follow AnimationTree/Mixer blending process), so the problem in #82828 is that this caused the delta to be 0 every frame.

Test project:
animtest.zip

@TokageItLab TokageItLab added this to the 4.2 milestone Oct 6, 2023
@TokageItLab TokageItLab requested a review from a team as a code owner October 6, 2023 06:54
@akien-mga akien-mga merged commit 249e724 into godotengine:master Oct 6, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@TokageItLab TokageItLab deleted the fix-unwanted-start-in-animation-player branch February 14, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AnimationPlayer now resets on every frame it is called
2 participants