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 Animation::subtract_variant for affine transforms #79279

Merged

Conversation

kleonc
Copy link
Member

@kleonc kleonc commented Jul 10, 2023

Transform2D::inverse/Transform3D::inverse which were used in Animation::subtract_variant work only for rotation + translation, don't work for scale, skew, etc.

This resulted in e.g. PropertyTweener incorrectly calculating the delta for affine transforms:

delta_val = Animation::subtract_variant(final_val, initial_val);

Fixes #79242.

@kleonc kleonc added bug topic:animation cherrypick:4.0 cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Jul 10, 2023
@kleonc kleonc added this to the 4.2 milestone Jul 10, 2023
@kleonc kleonc requested a review from TokageItLab July 10, 2023 11:52
Copy link
Member

@TokageItLab TokageItLab left a comment

Choose a reason for hiding this comment

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

BTW, probably Transform3D skew will be discarded immediately, see also #64418 and #72287.

@YuriSizov YuriSizov merged commit de14f09 into godotengine:master Jul 14, 2023
@YuriSizov
Copy link
Contributor

Thanks!

@kleonc kleonc deleted the animation-fix-transform-subtracting branch July 18, 2023 20:48
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.2.

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Aug 31, 2023
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.

Tweening Transform2D borken when initial scale is not (1, 1)
3 participants