Code: Select all
mp_DynamicsWorld->removeRigidBody(mp_RigidBody);
mp_DynamicsWorld->addRigidBody(mp_RigidBody, CM_IGNORED, btBroadphaseProxy::AllFilter);
It seems to work fine in terms of actually changing the collision group (Objects without CM_IGNORED in their mask will not collide with the object), but the object itself completely stops moving for some reason. I had a look at the rigid body's values and it seems like the gravity and velocity are what they should be (Not 0) and yet the object just doesn't move... The weirdest thing is that if I change the object's collision group back to what it originally was (Again by removing and re-adding the object) it works fine again. The problem is I obviously need the object to react normally in the time between changing group and changing back.
Am I wrong in thinking that those default masks aren't used and can be overridden with my own? I assume my method of changing the group is fine since it does appear to filter out the right collisions, and works normally when reversed. Any ideas?

EDIT: Ok it seems I wasn't quite right about it working fine after reversing it. It seems to work most of the time, but not all the time, which makes this seem even weirder...