The direction of the Ray. This must be normalized (with Vector3.normalize) for the methods to operate properly. Default is a Vector3 at (0, 0, -1).
The origin of the Ray. Default is a Vector3 at (0, 0, 0).
Read-only flag to check if a given object is of type Ray.
Compute a Vector3 that is a given distance along this Ray.
The computed vector.
the distance along the Ray to retrieve a position for.
Optional
target: Vector3— (Optional) If defined, the result will be copied into this Vector3.
Get the squared distance between this Ray and a line segment.
Th distance squared.
the start of the line segment.
the end of the line segment.
(optional) if this is provided, it receives the point on this Ray that is closest to the segment.
(optional) if this is provided, it receives the point on the line segment that is closest to this Ray.
A ray that emits from an origin in a certain direction.