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 AABB calculation for meshes using Skeleton2D #74416

Merged
merged 1 commit into from
Mar 8, 2023

Conversation

SlugFiller
Copy link
Contributor

Fixes #71953. The issue stemmed from Transform2D using "columns" and Transform3D using "rows" so directly copying the arrays caused the matrix to be flipped.

Also fixed an issue where re-creating/updating the mesh data would cause the AABB to reset to a state unrelated to the skeleton, while the mesh still believes it is in sync with the skeleton.

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

Looks great! It seems that this was broken since b08f13d. You can see that b08f13d updated the skeleton3D code to the new format, but not the skeleton2D code. I tested locally and can confirm this fixes canvas groups and it fixes a culling issue that could happen with rotated/translated bones

@akien-mga akien-mga merged commit a0ff87f into godotengine:master Mar 8, 2023
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.1.

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.

CanvasGroup bounding box calculation reacts incorrectly to bone rotation on Polygon2D
4 participants