> For the complete documentation index, see [llms.txt](https://docs.engagevr.io/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.engagevr.io/developer/afx/node-dictionary/unity/physics/raycast.md).

# Raycast

## Layer Mask nodes

See [Layer Mask](/developer/afx/node-dictionary/unity/physics/raycast/layer-mask.md).

## Raycast

Casts a ray and outputs information about the first thing that they ray hits.

**Inputs:**

<table><thead><tr><th width="171">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Origin</td><td>Vector3 [editable]</td><td>Starting point for the ray.</td></tr><tr><td>Direction</td><td>Vector3 [editable]</td><td>The direction in which to fire the ray.</td></tr><tr><td>Max Distance</td><td>Float [editable]</td><td>The maximum distance from <code>Origin</code> for the ray to travel.</td></tr><tr><td>Layer Mask</td><td>Integer [editable]</td><td>A Layer mask that's used to selectively ignore Colliders.</td></tr><tr><td>Query Trigger</td><td>Boolean [editable]</td><td>If true, the ray can hit a trigger. If false, the ray will ignore triggers.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="171">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Raycast Hit</td><td>Flow</td><td>Continue the initiating flow if the ray hit.</td></tr><tr><td>Raycast Miss</td><td>Flow</td><td>Continue the initiating flow if the ray missed.</td></tr><tr><td>Hit</td><td>Boolean</td><td>True if the ray hit something.</td></tr><tr><td>Collider Hit</td><td>Collider</td><td>Reference to the collider that the ray hit.</td></tr><tr><td>Distance</td><td>Float</td><td>Distance to the point of collision.</td></tr><tr><td>Point</td><td>Vector3</td><td>The point where the ray hit something.</td></tr><tr><td>Normal</td><td>Vector3</td><td>The normal of the surface the ray hit.</td></tr></tbody></table>
