sleep method
Sleep the rigid body.
Implementation
@override
void sleep(){
if(!allowSleep || sleeping ) return;
linearVelocity.set(0,0,0);
angularVelocity.set(0,0,0);
sleepPosition.copy(position );
sleepOrientation.copy(orientation );
sleepTime = 0;
sleeping = true;
for(Shape? shape = shapes; shape != null; shape = shape.next ) {
shape.updateProxy();
}
}