RaycastResult
Show Deprecated
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.
Summary
Properties
The distance between the ray origin and the intersection point.
The Enum.Material at the intersection point.
The position of the intersection between the ray and the part.
The normal vector of the intersected face.
Properties
Material
The Enum.Material at the intersection point. For normal parts this is the BasePart.Material; for Terrain this can vary depending on terrain data.
Position
The world space point at which the intersection occurred, usually a point directly on the surface of the instance.