NewtonBodySetFreezeState
NewtonBodySetFreezeState
Syntax:
void NewtonBodySetFreezeState (const NewtonBody* body, int state)
Usage
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
Parameters
- const NewtonBody *bodyPtr - pointer to the body.
- int state - Freeze state. 1 to freeze . 0 to unfrezze.
Description
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.
See also
NewtonBodyGetSleepState NewtonBodyGetAutoSleep NewtonBodySetAutoSleep NewtonBodyGetFreezeState