I've been meaning for a while to mess around with destructible meshes (they're way cool!). Making physically accurate destructible meshes is hard. Instead, I've opted for a simple scheme that still has great visual results for compact objects. The technique works like this: Choose a plane to split the mesh along. Create two new meshes to hold the fragments. For each triangle in the mesh: if the triangle is entirely above the plane, add it to the first mesh. Otherwise, add it to the second mesh. Create a new scene node/rigid body for each of the fragments. I added some optimizations as well. To begin, you don't have to copy the triangle data for both fragments. They share the exact same mesh data, just different halves of it. Instead, I create a new index buffer for each fragment and then re-use the same vertex buffer. This works really well and is relatively light on the video memory. Another thing I did is to re-use the original destructible mesh object. T
Aspiring to be the nerdiest blog you'll ever read