RaycastResult

lumin. RaycastResult

Base raycast result, also used for prism hits.

Methods

getDistance() → {number}

Returns the distance (in meters) from the raycast source to the intersected object.
(if 0, source is inside or just touching the object)

Returns:
Type
number

getNormal() → {vec3}

Normal vector at the intersection point. Note not all raycasts support generating normals, so
this value should be checked for a 0-length vector before using.

Returns:
Type
vec3

getPointHit() → {vec3}

Returns:
Type
vec3

getPrismId() → {number}

Returns the prism that was intersected by a raycast.

Returns:
Type
number

getType() → {lumin.RaycastResultType}

Returns the Raycast result type.

Returns:

the result type.

Type
lumin.RaycastResultType