Physics · interface

RayHit

What a ray or a sweep found. Caller-owned; a query fills it and never allocates one.

Explained in Your first game, Rigid bodies.

interface RayHit
import type { RayHit } from '@driftengine/physics';

Properties

NameTypeDescription
bodynumber
fractionnumberFraction along the ray or sweep, in [0, 1].
xnumber
ynumber
znumber
nxnumber
nynumber
nznumber