gltf-extensions icon indicating copy to clipboard operation
gltf-extensions copied to clipboard

Add physics materials and filtering similar to KHR/MSFT physics

Open aaronfranke opened this issue 7 months ago • 2 comments

Preview: https://github.com/aaronfranke/gltf-extensions/tree/msft-style-mat-filter/extensions/2.0/OMI_physics_body

These changes add physics materials and filtering very similar to Eoin's Microsoft/KHR physics repo here: https://github.com/eoineoineoin/glTF_Physics

I did not include any example files for these. However, this is not so important because the goal here is alignment with the other spec. Also, these are not easy to implement in Godot Engine, since it uses per-body filtering instead of per-shape (which is worse btw), and its physics materials work differently (worse), so it's difficult to support these features there. For both it can still be done, but not so cleanly, and I haven't had time yet to do it.

As part of alignment, this PR also adds a new "gravityFactor" property to motion. This was discussed as desired and added to MSFT physics a long time ago, but I guess we missed that before now.

I also did some minor formatting changes, such as changing * unordered lists to - to match Khronos style, and reordering properties to match the contents of Eoin's repo.

aaronfranke avatar Jul 14 '24 21:07 aaronfranke