RayHit
Ray hit.
Result of a rayCast.
Note: this class wraps internal engine data and should only be created internally.
.constructor(engine: WonderlandEngine, ptr: number) ⇒ RayHit
Param | Type | Description |
---|---|---|
engine | WonderlandEngine | |
ptr | number | Pointer to the ray hits memory. |
.distances: Float32Array
Prefer these to recalculating the distance from locations.
Distances of array hits to ray origin.
.hitCount: number
Number of hits (max 4)
.locations: Float32Array[]
Array of ray hit locations.
.normals: Float32Array[]
Array of ray hit normals (only when using rayCast.
.objects: null | Object3D[]
Hit objects