Converting loaded Static Mesh to a Convex Hull (Or Similar).
Posted: Thu Dec 18, 2014 11:09 pm
Hello,
I have more of a best practices kind of question. So I have a working Bullet Physics implementation with walking camera, dynamically insertable/deletable objects like boxes, and a dynamically loaded mesh from file.
So far so good; basically I can load a static mesh and walk through the environment with full physics.
Now, for certain mesh that I identify, like a door for example, I would like to turn that mesh from a static mesh into an object I can interact with (move around, reacts to physics, etc.)
Currently, these sort of objects I am loading in as static mesh (via a btBvhTriangleMeshShape class).
The question is if there is a possibility to convert such a shape, after being loaded, into a dynamic object while it is attached to the dynamics world.
For example, I click on an object (via a RayTest, collision callback) and based on my defined callback convert the btBvhTriangleMeshShape into a ConvexHull shape (or whatever works) and then I can move the clicked object around, etc.
I hope this question makes sense.
Thank you for your time.
I have more of a best practices kind of question. So I have a working Bullet Physics implementation with walking camera, dynamically insertable/deletable objects like boxes, and a dynamically loaded mesh from file.
So far so good; basically I can load a static mesh and walk through the environment with full physics.
Now, for certain mesh that I identify, like a door for example, I would like to turn that mesh from a static mesh into an object I can interact with (move around, reacts to physics, etc.)
Currently, these sort of objects I am loading in as static mesh (via a btBvhTriangleMeshShape class).
The question is if there is a possibility to convert such a shape, after being loaded, into a dynamic object while it is attached to the dynamics world.
For example, I click on an object (via a RayTest, collision callback) and based on my defined callback convert the btBvhTriangleMeshShape into a ConvexHull shape (or whatever works) and then I can move the clicked object around, etc.
I hope this question makes sense.
Thank you for your time.