public override void postSolve(Contact contact, ContactImpulse impulse) { if (m_broke) { // The body already broke. return; } // Should the body break? int count = contact.getManifold().pointCount; float maxImpulse = 0.0f; for (int i = 0; i < count; ++i) { maxImpulse = MathUtils.max(maxImpulse, impulse.normalImpulses[i]); } if (maxImpulse > 40.0f) { // Flag the body for breaking. m_break = true; } }
public virtual void postSolve(Contact contact, ContactImpulse impulse) { }