bevy_xpbd
bevy_xpbd copied to clipboard
Add `AsyncSceneCombinedCollider`
We currently have AsyncSceneCollider which adds colliders for each mesh.
But sometimes it's useful to have a single collider for all meshes combined. For this users have to iterate over all meshes after scene spawned, combine them into a single mesh and attach a collider from it. But it would be more convenient to have a built-in feature for it.
I would add that this would be useful for blender based scene workflow.
Currently adding AsyncCollider to a object would not work, since blender objects get turned into sub-scenes (iirc), which have the actual mesh bearing entity as a child.
Really, in my opinion AsyncCollider should take into account sub-entities, rather than making a new component.
As a separate concern, it would be good to have AutomaticCollider's for capsule, sphere, cuboid, plane, etc.
And more complex logic, like automatically deciding between a plane and a cuboid, also strikes me as useful.
Also also, I wonder if I could get something working with blender render-graphs for drawing the collider from custom properties and then positioning it visually as a child of the mesh.