How to check whether your body is moving or it is in rest in box2D iPhone or ANDROID?

By | February 13, 2011

To check whether your body is in rest or not you need to check whether the body->IsAwake() function returns true.IF yes then your body is at rest. Take a look at the following snippet.

b2Body *body;
if(body->IsAwake())
{
       //Your body is awake, not in rest…
}
else {
       // Your body is in rest…..
}

Leave a Reply

Your email address will not be published. Required fields are marked *