void NewtonBodySetFreezeState (const NewtonBody* body, int state)
Set the Freeze state of the body. This function tells Newton to simulate or suspend simulation of this body and all other bodies in contact with it
- const NewtonBody *bodyPtr - pointer to the body.
- int state - Freeze state. 1 to freeze . 0 to unfrezze.
When a body is set to freeze state, the body and all the other bodies associated with that body are also set to same freeze state, so the entire "island" of objects is frozen in space.
Each body still gets Force and Torque callback, which makes is easy to inspect the body and to see if it has to be unfrozen.
If some other body collide or is connected to a frozen body, the entire island become dynamic again, but only while they are connected to an non-frozen body. When they lose the contact they become frozen again.