Skip to content

RayHit

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

Result of a ray-vs-AABB hit: the entry axis and parametric distance t along dir.

readonly axis: AabbAxis

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

The face the ray entered through.


readonly t: number

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

Entry point, parametric in units of dir: a world distance when dir is unit-length, or a fraction of the segment when dir is to - from.