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 support for explicitly-defined compound triggers in GLTF files #88301

Merged

Conversation

aaronfranke
Copy link
Member

@aaronfranke aaronfranke commented Feb 13, 2024

Implements omigroup/gltf-extensions#206 in Godot.

This PR adds explicit compound triggers, specified by a new "nodes" property under the "trigger" property inside of the "OMI_physics_body" extension on nodes.

Amazingly, this PR preserves bidirectional compatibility with the current master. Files exported in this PR will import correctly in master, and files exported in master will import correctly in this PR. Not all files will import the same of course, a hand-crafted file or a file created outside of Godot may import differently, and note that I am not talking about 4.2, a file exported in 4.3 won't keep physics when imported in 4.2 due to another PR that changed the format.

Example file: https://github.com/omigroup/gltf-extensions/blob/main/extensions/2.0/OMI_physics_body/examples/basic/compound_trigger.gltf

This is one of those hand-crafted files I mentioned in the paragraph above, where it will import incorrectly without this PR. When using this PR, it will import correctly and will look like this:

Screenshot 2024-02-11 at 4 19 06 AM

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Apr 25, 2024
@akien-mga akien-mga merged commit cb01094 into godotengine:master Apr 26, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@aaronfranke aaronfranke deleted the gltf-explicit-compound-triggers branch April 26, 2024 10:02
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