Deleting RigidBodies
Posted: Fri Nov 06, 2015 4:27 pm
Hello,
I have been trying deleting rigid bodies during simulation and it always crashes my application. I followed the below code.
I have been trying deleting rigid bodies during simulation and it always crashes my application. I followed the below code.
Code: Select all
void destroyBodies(btDiscreteDynamicsWorld* dynamicsWorld, btRigidBody* body)
{
dynamicsWorld->removeRigidBody(body);
delete body->getMotionState();
delete body;
}