|
Hi all,
What is the best strategy to update a mesh inside a btBvhTriangleMeshShape?
Let me explain a bit. We have a ground made of voxels. They are not rendered as cube. The ground is split into chunks (16x16x<world height>). For each chunk we create a static rigid body with a shape in Bullet using btTriangleIndexVertexArray, btIndexedMesh and btBvhTriangleMeshShape. One of our game's features is that the ground is modifiable in real-time (i.e. you can add or remove voxels). At the moment, to update a chunk in Bullet, we remove the rigid body from the world, we delete the rigid body and the shape and we re-create them with the new mesh. For us, it seems definitively not efficient. But maybe we have missed something. If there any way to update the content of a btBvhTriangleMeshShape without delete it, it would be great.
Thank you for your answer.
|