Skip to content

RayResult

Inherits ?

RayResult is a data type that contains data about a raycast result.

Not newable

This object cannot be created by scripts using Instance.New().

Properties

Origin : Vector3

The origin point of the ray.

Direction : Vector3

The direction vector of the ray.

Position : Vector3

The position where the ray hit an object.

Normal : Vector3

The surface normal at the point where the ray hit.

Distance : number

The distance from the ray's origin to the hit point.

Instance : Instance

The instance that was hit by the ray.