Skip to content

@emile/engine


@emile/engine / physics/collider / CollisionCallback

Type Alias: CollisionCallback() ​

CollisionCallback = (pair, a, b) => void

Defined in: src/physics/collider.ts:32

Represents a collision callback.

Parameters ​

pair ​

Matter.Pair

The matter pair.

a ​

Entity

The entity owning the collider / this callback.

b ​

Entity

The other entity. (This is the entity that collided with the collider)

Returns ​

void

Note ​

Entity a will always be the entity that has the collider the callback is attached to.