CollisionPair

View source

Represents two entity handles selected as a 2D broadphase collision candidate.

A pair generated from PhysicsHitbox bounds identifies entities whose axis-aligned bounds overlap. It is candidate data, not confirmation that the entities’ shapes collide. The broadphase normally stores instances in CollisionPairs for the current candidate set.

Constructor


constructor(a: EntityHandle, b: EntityHandle)

View source

Creates a candidate pair from two entity handles.

The handles are assigned to a and b as supplied, preserving their references and order. The constructor performs no validation and does not test bounds overlap or confirm a collision.

Parameters

NameDescriptionDefault
a

Handle stored in a.

—
b

Handle stored in b.

—

Properties


a: EntityHandle

View source

Entity handle stored in the first position of this candidate pair.

When generated from overlapping PhysicsHitbox bounds, this is the first entity in the unordered combination. Its presence does not confirm that the entities’ shapes collide.

b: EntityHandle

View source

Entity handle stored in the second position of this candidate pair.

When generated from overlapping PhysicsHitbox bounds, this is the second entity in the unordered combination. Its presence does not confirm that the entities’ shapes collide.