Expose post-solve per-contact impulse (e.g. via a new `OnContactSolved` callback)

Author: jbltxCreated Sep 15, 2026Updated Sep 18, 2026

Hello, I have a small exposure request to make in order to fix a bug i have on my end (ragdoll collisions in my case).

ContactListener's callbacks (OnContactValidate, OnContactAdded, OnContactPersisted) all fire before the constraint solver runs, so the impulse passed to them is unknown at that point. OnContactAdded's own doc comment says so. That makes it hard to get the actual force of a collision after the fact.

The data already exists internally. ContactConstraintManager::StoreAppliedImpulses runs after the velocity solve and writes it: GetTotalLambda() from the non-penetration and friction constraints, stored into CachedContactPoint::mNonPenetrationLambda / mFrictionLambda. CachedContactPoint is a private nested type of ContactConstraintManager, so nothing outside the solver can read it.

EstimateCollisionResponse is the closest public API, but its own doc says it "will not be accurate when more than 2 bodies collide at the same time." That rules it out whenever more than two bodies contact at once, e.g. a stack, or a ragdoll bone touching several surfaces simultaneously.

Request: a way to read the real post-solve impulse per contact point, e.g.:

  • A new ContactListener::OnContactSolved(const ContactManifold&, ...) callback fired from StoreAppliedImpulses, carrying the resolved lambdas, or
  • A public accessor from PhysicsSystem/ContactConstraintManager keyed by body/sub-shape pair, read after Update().

Discussion #191 and issue #132 both asked for collision impulse and were pointed at EstimateCollisionResponse, which doesn't cover the multi-contact case. This would close that gap instead of approximating it.