preSolveCallback property
A callback that runs before contacts are solved, which can veto a contact for the step by returning false.
Only called for contacts between shapes that have ShapeDef.enablePreSolveEvents set. The callback runs during the physics step and must not access the world.
Implementation
set preSolveCallback(
bool Function(Shape shapeA, Shape shapeB, Vector2 normal)? callback,
) {
physicsWorld.preSolveCallback = callback;
}