the renderable whose handler is firing — always === this.
the partner renderable — always === other.
alias of overlap.
index of shapeA in the receiver's body.shapes.
index of shapeB in the partner's body.shapes.
true when either shape is a trigger, so the pair contributes no push-out.
contact normal oriented for the receiver.
penetration depth. Zero in onShapeCollisionEnd, where the shapes have separated.
contact normal in the legacy overlapN convention.
minimum translation vector for the receiver.
Z components, non-zero only for a Box3d pair that resolved along Z.
the receiver's own shape in this contact.
the partner's shape in this contact.
One overlapping SHAPE pair, passed to the shape-level collision lifecycle hooks (
onShapeCollisionStart,onShapeCollisionActive,onShapeCollisionEnd).Why this exists alongside
CollisionResponse. A body may collide with another through several shapes at once.onCollisionand theonCollision*lifecycle report ONE contact per body pair — the one chosen for physical resolution — so a footprint contact can mask a simultaneous hurtbox contact. These hooks report every overlapping pair, without changing which one resolves.Opt-in. The detector only enumerates shape pairs when an object declares at least one of these handlers. Declaring none costs nothing.
Supported on every backend. The builtin detector enumerates shape pairs directly;
@melonjs/planck-adapterand@melonjs/matter-adaptermap one melonJS shape onto one native collider and their engines already report contacts per collider pair, so both dispatch these natively. The adapters supplynormalanddepthrather than the full SAT vector set, matching what they already provide toonCollision.Receiver-symmetric, exactly like
CollisionResponse:aandshapeAare always the side whose handler is firing,bandshapeBthe partner.Do not retain it. The object is pooled and reused across pairs and frames. Copy anything needed beyond the handler call.
Example