We’re introducing Meta accounts in August 2022: a new way to log into VR devices that doesn’t require a Facebook account. Learn more


Enables a raycast gizmo with overrides for position and direction.

Appearance in Composition Pane

Raycast with overrides will cause the specified raycast gizmo to fire a data-gathering beam from an origin position, with a given direction. A raycast gizmo must be referenced in the first parameter, but will fire from the given position and direction. The data gathered by the raycast can then be extracted with the get raycast data.

object, vector, vector


RAYCAST precedes this tutorial

Example 1: Aiming scope

Imagine this script attached to an aiming scope, when the event aim is received, raycast causes ray1 to fire a beam in its direction. If the get raycast data registers a hit, then the event fire is sent back to self, passing in a parameter containing the hit position. When fire is received, a second raycast gizmo, ray2, fires from its position directly at the positional coordinates that were passed in.