postSolve method

  1. @override
void postSolve(
  1. Contact contact,
  2. ContactImpulse impulse
)
override

This lets you inspect a contact after the solver is finished. This is useful for inspecting impulses. Note: the contact manifold does not include time of impact impulses, which can be arbitrarily large if the sub-step is small. Hence the impulse is provided explicitly in a separate data structure. Note: this is only called for contacts that are touching, solid, and awake. impulse this is usually a pooled variable, so it will be modified after this call

Implementation

@override
void postSolve(Contact contact, ContactImpulse impulse) {
  _callback(
    contact,
    (contactCallback, other) =>
        contactCallback.postSolve(other, contact, impulse),
  );
}