Body gets stuck floating after body below it is removed
Posted: Tue Nov 20, 2012 11:32 pm
I have a physics body (A) that falls and settles on top of another body (B). Body B is then modified and no longer supporting body A. Body A continues to stay in the air.
I've tried reactivating body A using activate(). I've tried setting it's linear velocity, it moves at first then slows like it's having friction applied to it (while in the air). The only way I can get it to move again is to use applyForce(). And I have to give it enough force to knock it loose. If I apply too little force body A will just shake or swing like it has a corner stuck. I've changed its activation state to 1 as well. I compared all the values I could think to try between a stuck body and one in free-fall. They appeared to be identical in almost every way. (They had different island IDs).
Applying force down on body A causes it to react as if there's still a body there, but only immediately beneath it. If body A moves to the side at all, it will fall.
Body B is a custom implementation. Its shape extends BoxShape, it's collision algorithm extends CollisionAlgorithm and the body extends RigidBody. Everything else about it works perfectly. It just seems that other bodies that land on it do not properly "wake up" after stopping on it.
Where should I be looking to solve this? What about body A should I alter to make it respond to gravity/collisions normally again?
Thanks for your help.
I've tried reactivating body A using activate(). I've tried setting it's linear velocity, it moves at first then slows like it's having friction applied to it (while in the air). The only way I can get it to move again is to use applyForce(). And I have to give it enough force to knock it loose. If I apply too little force body A will just shake or swing like it has a corner stuck. I've changed its activation state to 1 as well. I compared all the values I could think to try between a stuck body and one in free-fall. They appeared to be identical in almost every way. (They had different island IDs).
Applying force down on body A causes it to react as if there's still a body there, but only immediately beneath it. If body A moves to the side at all, it will fall.
Body B is a custom implementation. Its shape extends BoxShape, it's collision algorithm extends CollisionAlgorithm and the body extends RigidBody. Everything else about it works perfectly. It just seems that other bodies that land on it do not properly "wake up" after stopping on it.
Where should I be looking to solve this? What about body A should I alter to make it respond to gravity/collisions normally again?
Thanks for your help.