updateSolveMassProperties method

void updateSolveMassProperties()

If the body is sleeping, it should be immovable / have infinite mass during solve. We solve it by having a separate "solve mass".

Implementation

void updateSolveMassProperties(){
  if (sleepState == BodySleepStates.sleeping || type == BodyTypes.kinematic) {
    invMassSolve = 0;
    invInertiaSolve.setZero();
    invInertiaWorldSolve.setZero();
  }
  else {
    invMassSolve = invMass;
    invInertiaSolve.copy(invInertia);
    invInertiaWorldSolve.copy(invInertiaWorld);
  }
}