Skip to main content

Raycast

Overview

Casts a ray against the target mesh and returns information about the first intersection, including whether the ray hit, the hit position, surface normal, and distance from the ray origin.


Inputs

NameTypeDescription
Target GeometryMeshDataThe mesh to test for ray intersections.
Source PositionVector3The starting position of the ray.
Ray DirectionVector3The direction in which the ray is cast.
Ray LengthFloatThe maximum distance the ray will travel.

Outputs

NameTypeDescription
Is HitBooleanReturns true if the ray intersects the target mesh.
Hit PositionVector3The world-space position of the first intersection.
Hit NormalVector3The surface normal at the intersection point.
Hit DistanceFloatThe distance from the source position to the hit point.

Parameters

This node does not expose additional parameters.


Behavior Notes

  • Only the closest intersection along the ray is returned.
  • The ray is cast from Source Position in the Ray Direction for up to Ray Length units.