Changes to AutoFreeze and forcetorque callback

From Newton Wiki
Jump to: navigation, search

Description

AutoFreeze was a important part of newton 1.53 and still is used in newton today. In newton 1.53 once a body was in perfect equilibrium it would go to frozen state and not be reactivated until explicitely told to do so by a call to NewtonWorldUnfreezeBody When a body was put to frozen state in 1.53 it also no longer received the NewtonBodyGetForceAndTorqueCallback callbacks.

Porting old code

In newest newton this works generally the same, but AutoFreeze was renamed to AutoSleep and calls to NewtonWorldUnfreezeBody are no longer neccesary since the NewtonBodyGetForceAndTorqueCallback is now always called and once a sufficient force is applied in NewtonBodyGetForceAndTorqueCallback the body will be automaticly reactivated.