Problem removing rigid body from simulation

sak
Posts: 3
Joined: Tue Oct 18, 2016 2:49 pm

Problem removing rigid body from simulation

Post by sak »

So I have already posted a question on Stack Overflow, but I haven't gotten much response so I thought I would try here:

http://stackoverflow.com/questions/4008 ... et-physics

So basically I am having trouble removing a rigid body from the simulation after a physics timestep. I am using:

Code: Select all

dynamicsWorld->removeCollisionObject(collisionBody);
to remove the object. It works perfectly for an object which is moving, but when I try to use this on a static object, I still get collisions with that object.

I have tried making it a kinematic body, and I have tried disabling deactivation, but nothing seems to work.

Is there anything else I have to be aware of regarding the removal of rigid bodies from the dynamics world?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Problem removing rigid body from simulation

Post by Erwin Coumans »

This should not happen. How is your character represented? A btBoxShape in a btRigidBody? Please provide more info about the character, and reproduce the issue inside the Bullet Example Browser. No reproduction in example browser makes it very difficult to help.