bevy_xpbd icon indicating copy to clipboard operation
bevy_xpbd copied to clipboard

Add `AsyncSceneCombinedCollider`

Open Shatur opened this issue 1 year ago • 2 comments

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.

Shatur avatar Feb 18 '24 13:02 Shatur

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.

blueforesticarus avatar Apr 26 '24 13:04 blueforesticarus

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.

blueforesticarus avatar Apr 26 '24 13:04 blueforesticarus