void dCustomKinematicController::Init (NewtonBody* const body, const dMatrix& matrix) { CalculateLocalMatrix(matrix, m_localMatrix0, m_localMatrix1); m_autoSleepState = NewtonBodyGetAutoSleep(body) ? true : false; NewtonBodySetSleepState(body, 0); SetPickMode(1); SetLimitRotationVelocity(10.0f); SetTargetMatrix(matrix); SetMaxLinearFriction(1.0f); SetMaxAngularFriction(1.0f); // set as soft joint SetSolverModel(2); }
bool NzPhysObject::IsAutoSleepEnabled() const { return NewtonBodyGetAutoSleep(m_body) != 0; }
bool cPhysicsBodyNewton::GetAutoDisable() const { return NewtonBodyGetAutoSleep(m_pNewtonBody) == 0 ? false : true; }