Add support for explicitly-defined compound triggers in GLTF files #88301
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: