Skip to main content
Version: 4.0.0

Ray Cast

ray cast

Detects intersections with colliders in the 3D environment by casting a ray from one point in space to another. All determines if the ray should extend to its entire length, while Near will stop at the nearest object it hits.

Input

NameData TypeDescription
StartExecStart the ray cast.
Ray TypeStringA setting to determine if the ray should extend to its entire length, or stop at the nearest object it hits.
OriginVec3The starting point of the ray. You can provide a 3D vector value as the ray's origin..
DirectionVec3The direction in which the ray will be cast. You can provide a 3D vector value as the ray's direction.
LengthNumberThe maximum distance the ray should travel. If not provided, the ray will travel infinitely.

Output

NameData TypeDescription
NextExecExecute the next node.
Raycast HitBooleanOutputs true if the raycast hits an object; false if not. Connect this output to other nodes to create custom logic based on the raycast result.
Hit Info ArrayArray<T>The result of the raycast if it intersects with a collider. Connect this output to a Ray Hit Info node to access the information.