Scripted Object Destruction
-
dunderwood
- Gnoblar
- Posts: 7
- Joined: Mon Feb 10, 2014 11:50 pm
- Location: Raleigh, NC
Scripted Object Destruction
Has anyone around here tried to do anything with scripting an object to be destroyed? That is, try to programmatically edit the object's mesh and integrate that with physics, rather than replace the mesh with a mesh of the destroyed object or an animation?
- c6burns
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 139
Re: Scripted Object Destruction
There's a voronoi fracture demo in the bullet library which you can use to fracture a cuboid into convex hulls. I integrated this into some very simple destruction code (eg. smashing windows and stone pillars). Fracturing a non-primitive would be a lot tougher. I'd likely approach that by fracturing the object in DCC tools, but that's not what you're asking about 
-
dunderwood
- Gnoblar
- Posts: 7
- Joined: Mon Feb 10, 2014 11:50 pm
- Location: Raleigh, NC
Re: Scripted Object Destruction
Hmmm. That's really interesting. I didn't notice that demo there before. It should be interesting to try to make it work for arbitrary objects, but I may have to do something with the material scripts or some other scripting to control how each piece is breakable.
I do think the easy way to approach it would be through the CC pipeline, but I'm going to try to make a game that is heavily modifiable by the community, and would like it to be easy for them to integrate destructible entities.
I do think the easy way to approach it would be through the CC pipeline, but I'm going to try to make a game that is heavily modifiable by the community, and would like it to be easy for them to integrate destructible entities.