@@ -117,6 +117,7 @@ void Rigid::updateCenterOfMass()
void Rigid::applyImpulse(const Point3F &r, const Point3F &impulse)
{
+ if (impulse.lenSquared() < mass) return;
atRest = false;
// Linear momentum and velocity
@@ -1118,7 +1118,7 @@ void RigidShape::updatePos(F32 dt)
F32 k = mRigid.getKineticEnergy();
F32 G = mNetGravity* dt * TickMs / mDataBlock->integration;
- F32 Kg = 0.5 * mRigid.mass * G * G;
+ F32 Kg = mRigid.mass * G * G;
if (k < sRestTol * Kg && ++restCount > sRestCount)
mRigid.setAtRest();
}
@@ -808,7 +808,7 @@ void Vehicle::updatePos(F32 dt)