Skip to content

RaycastResult

Not yet Datatype

Stores results from a raycast operation.

Not implemented in Nova

This datatype is not registered in Nova's Lua VM. Constructing or receiving it from an API call will not work.

Description

The RaycastResult data type stores the result of a successful raycasting operation performed by WorldRoot.Raycast(). It contains the properties listed below.

This object should not be confused with the similarly-named RaycastParams which is used to perform a raycast.

Properties

Distance Not yet The distance between the ray origin and the intersection point.
RaycastResult.Distance()

The distance between the ray origin and the intersection point.

Instance Not yet The BasePart or Terrain cell that the ray intersected.
RaycastResult.Instance()

The BasePart or Terrain cell that the ray intersected.

Material Not yet The Material at the intersection point.
RaycastResult.Material()

The Material at the intersection point. For normal parts this is the BasePart.Material; for Terrain this can vary depending on terrain data.

Position Not yet The world space point at which the intersection occurred.
RaycastResult.Position()

The world space point at which the intersection occurred.

The world space point at which the intersection occurred, usually a point directly on the surface of the BasePart or Terrain cell.

Normal Not yet The normal vector of the intersected face.
RaycastResult.Normal()

The normal vector of the intersected face.

Roblox reference: RaycastResult