Skip to content

CollisionEvent

Defined in: physics/src/types.ts:86

Collision event data passed to collision handlers.

optional contactNormal?: Vec2

Defined in: physics/src/types.ts:94

Contact normal (only for started collisions).


optional contactPoint?: Vec2

Defined in: physics/src/types.ts:96

Contact point in world pixels (only for started collisions).


other: Entity

Defined in: physics/src/types.ts:88

The other entity involved in the collision.


otherCollider: ColliderComponent

Defined in: physics/src/types.ts:90

The other entity’s collider component.


started: boolean

Defined in: physics/src/types.ts:92

True if the collision just started, false if it ended.