Hit record for a ray query against the SceneCollisionIndex.

tEnter and tExit are the parametric distances along the ray at which it enters and exits the object's world-space AABB. The hit point is origin + dir * tEnter. Results are reported in ray-AABB granularity — triangle-level intersection tests are not performed.

interface SceneCollisionRayHit {
    objectId: string;
    tEnter: number;
    tExit: number;
}

Properties

Properties

objectId: string

ID of the SceneObject.

tEnter: number

Parametric distance along the ray at which it enters the object's AABB.

tExit: number

Parametric distance along the ray at which it exits the object's AABB.