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 root_motion_local option to AnimationMixer to pre-multiply root motion rotation accumulator before blending #99394

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

TokageItLab
Copy link
Member

@TokageItLab TokageItLab commented Nov 18, 2024

Extracting local root motion translation with the accumulator was implemented/described in #72931, but when there is a fade, the local translation is not extracted correctly because the rotation of animation B affects the extraction of the local translation of animation A which may have different rotation.

Add an option to extract local moves before blending. The default is false due to keep compatibility and there are some performance concerns.

image

Also contain some minor fix for missing post_process_key_value().

@vaner-org
Copy link
Contributor

Works great and significantly simplifies implementing root motion.

Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense and the above commenter tested.

@Repiteo Repiteo merged commit fe1c044 into godotengine:master Nov 22, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 22, 2024

Thanks!

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

Successfully merging this pull request may close these issues.

With fading, root motion does not correctly extract local position by rotation accumulator
5 participants