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 center of mass when importing GLTF physics bodies #77602

Merged

Conversation

aaronfranke
Copy link
Member

See also this PR where I am making the behavior explicit in the spec omigroup/gltf-extensions#167

The one thing I'm unsure of is with exporting, if we want to bake in a custom center of mass when exporting a GLTF from Godot, or not. I would tend towards keeping the node positions the same instead of moving them around, but it would also make sense to adjust the node positions. In this PR I only changed the import behavior, and made a warning on export, but if it's desired I can also change the export behavior to bake in the center of mass. In either case I'm not worried about it, since it's not common to need this when building a physics object in the editor.

@aaronfranke aaronfranke added this to the 4.1 milestone May 29, 2023
@aaronfranke aaronfranke requested a review from a team as a code owner May 29, 2023 05:13
@akien-mga akien-mga merged commit 409a399 into godotengine:master May 29, 2023
@akien-mga
Copy link
Member

Thanks!

@aaronfranke aaronfranke deleted the gltf-import-center-of-mass branch May 29, 2023 15:07
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.

3 participants