Jondolf / avian

ECS-driven 2D and 3D physics engine for the Bevy game engine.
https://crates.io/crates/avian3d
Apache License 2.0
1.34k stars 108 forks source link

Marching Cubes support and/or examples? #94

Closed TheDan64 closed 1 year ago

TheDan64 commented 1 year ago

Was wondering if there's any plans to support marching cubes or some other variant of destructible terrain in this engine. Or if that's a bit too high level for xpbd, maybe there could be some sort of example along those lines?

Jondolf commented 1 year ago

Built-in destructible terrain is probably out of scope, as I'm not aware of anything special that would be related to the actual physics engine other than handling the colliders. Different games also require very different types of terrain that often has to be custom-made to some extent. There could maybe be a third party plugin for it though.

We could maybe have some kind of example or demo that includes destructible terrain eventually, but it feels too big for a singular example in this repository. I've had the idea of making a website with some larger WASM demos and maybe some kind of physics playground, so I suppose that could feature modifiable terrain. That's not something for the near future though.

In the future, we could also maybe support things like plasticity, tearing and fractures (e.g. destroy a wall into pieces) since that seems more involved on the physics side of things, but even that would probably make more sense as a third party plugin.

But if there are any missing features or other things in particular that currently prevent people from making their own terrain systems, let me know.