Reputation: 4853
How stop the rotation and moving of the body?
I do this:
mBody.setAngularDamping(100);
mBody.setLinearDamping(100);
but it does not stop the body completely, and
mBody.setActive(false);
it not freeze body fully.
Upvotes: 0
Views: 1448
Reputation: 24846
Just to stop:
body->setLinearVelocity(b2Vec2(0,0));
body->setAngularVelocity(0);
If you want your body to become immovable - make it static:
body->setType(b2_staticBody);
Upvotes: 4