Skip to content

SweptHit

Defined in: src/modules/collision/narrowphase.ts:72

Result of a swept AABB test: whether it hit, the surface normal, and tEntry (fraction of the motion travelled before impact).

readonly hit: boolean

Defined in: src/modules/collision/narrowphase.ts:73


readonly normal: Readonly<Vec2>

Defined in: src/modules/collision/narrowphase.ts:75

Collision normal on b’s surface (unit vector). {0,0} when no collision.


readonly tEntry: number

Defined in: src/modules/collision/narrowphase.ts:77

Fraction of motionA travelled before impact. 1 when no collision.