preSolve method

void preSolve(
  1. Object other,
  2. Contact contact,
  3. Manifold oldManifold
)

Called after collision detection, but before collision resolution.

This gives you a chance to disable the Contact based on the current configuration. Sensors do not create Manifolds.

Implementation

void preSolve(Object other, Contact contact, Manifold oldManifold) {
  onPreSolve?.call(other, contact, oldManifold);
}