Ray¶
Supported Datatype
Represents a line with a starting point that casts infinitely in a specific direction.
Description¶
The Ray data type represents a half-line, finite in one direction but infinite in the other. It can be defined by a 3D point, where the line originates from, and a direction vector, which is the direction it goes in.
Constructors¶
new Supported Returns a Ray with the given Origin and Direction.
Properties¶
Unit Supported The Ray with a normalized direction (the direction has a magnitude of 1).
The Ray with a normalized direction (the direction has a
magnitude of 1).
Direction Supported The direction vector of the Ray.
The direction vector of the Ray.
Methods¶
ClosestPoint Supported Returns a Vector3 projected onto the ray so that it is within the Ray line of sight.
Distance Supported Returns the distance between the given point and the closest point on the Ray.
Returns the distance between the given point and the closest point on the Ray.
Returns the distance between the given point and the point on the ray nearest to the given point (Ray.ClosestPoint(point)).
Nova binding inventory¶
| Library | Members |
|---|---|
new |
ClosestPoint, Direction, Distance, Origin, Unit, unit |
Roblox reference: Ray