Add Gaze Interaction with Building Blocks
Updated: Sep 8, 2026
Experimental
This feature is considered experimental. Use caution when implementing it in your projects as it could have performance implications resulting in artifacts or other issues that may affect your project. The Gaze Interaction Building Block adds a gaze interaction to your scene. A user looks at a target and pinches to act on it. This guide describes what the block puts in your scene, so that you can find each new component, inspect it, and tune it.
A Building Block installs a feature. It does not convert an interaction you already have from one input type to another. Adding the Gaze Interaction block leaves the interactors on your rig in place and adds gaze alongside them.
Before proceeding with this tutorial, complete the setup steps outlined in
Set Up Unity for XR development to create a project with the necessary dependencies.
Check the following in your scene before you add the block:
- A target object: select the GameObject you want to make gaze interactable. The block applies the interaction to the current selection.
- Hand tracking: the block adds gaze interactors for hands only, and the user selects by pinching. See Hand Tracking for the platform requirements.
- A world space Canvas: the UI Canvas variant needs the selected object to carry a
Canvas component set to World Space render mode. See Unity Canvas Integration for Canvas setup. - A complete eye gaze system: if the scene already contains an
EyeGaze component, confirm that it also has a child with a GazeConecaster component. The block creates a conecaster only when it creates the EyeGaze itself. A GazeInteractor that receives no conecaster leaves its Candidate Provider field empty and fails its startup check. A scene configured for eye tracking through Movement SDK can reach this state.
To add a building block to your Unity project:
In the Meta XR SDK Window, select Building Blocks. If the window isn’t visible, select Window > Meta > Meta XR SDK to open it.
In Unity 6000.3 or later, you can pin the SDK menu to the toolbar. Right-click the Unity toolbar and select Meta XR SDK > SDK menu.
The Building Blocks window opens. From this window, you can discover and add the building blocks available
from the Meta XR SDKs included in your project.
- Locate the building block you want to add and click the preview image to view a description.
- Click Add Block to import it into your scene.
The Gaze Interaction block asks you to choose a variant before it installs.
| Variant | Description |
|---|
Grab Object | Look and pinch at an object to grab it and move it around. |
UI Canvas | Look and pinch at a Canvas to select the buttons. |
UI Canvas is the default variant.
The block depends on the Interactions Rig block, which in turn depends on the Camera Rig block. Adding Gaze Interaction to a scene that has neither installs both. Interactions Rig is a singleton block, so a scene that already has one reuses it.
What the block adds to your scene
The stock interaction rig contains no gaze interactor. The block creates the interactors, the eye gaze system, and the interactable during installation.
The block creates a child GameObject under the object you selected and puts a GazeInteractable on it. The child takes a name that starts with [BuildingBlock], which is how an installed block marks its objects in the Hierarchy.
The Grab Object variant adds these components when the target lacks them:
| Component | Purpose |
|---|
ColliderSurface
| Supplies a surface for gaze hit testing when the target has no ISurface. |
MoveFromTargetProvider
| Moves the object while it is selected. |
Grabbable
| Receives the interactable events that drive the movement. |
Rigidbody
| Represents the physics body. A Rigidbody created by the block is kinematic and has gravity turned off. |
InteractableGazeHover3DVisual
| Paints a hover spotlight where the user looks. The block puts it on a separate child object, and adds it only when the target or one of its children has a MeshFilter with a mesh assigned. See Gaze hover spotlight. |
The UI Canvas variant adds these components instead:
| Component | Purpose |
|---|
PointableCanvas
| Bridges pointer events to your Canvas. The block puts this on the new child. |
GraphicRaycaster
| Required by Unity UI. The block adds one to the Canvas when it is missing. |
ConecastableCanvas
| Makes a Canvas a conecast target. The block adds it to the root Canvas and, by default, to every child Canvas. |
PointableCanvasModule
| Routes pointer events for the whole scene. The block adds one to the existing EventSystem, or creates a GameObject that carries both. |
The block adds a HandGazeInteractor to the interactor group of each hand. It skips a hand that already has a gaze interactor, so a second install produces no duplicates.
If the scene has no EyeGaze, the block creates one as a sibling of the HMD and gives it a child GazeConecaster. It uses OVREyeGaze when the HMD belongs to the Meta XR camera rig, and UnityXREyeGaze in any other rig. If the scene has no HMD, the block creates no eye gaze system and logs this message:
Cannot create EyeGaze system: HMD not found in scene.
Ray fallback is enabled by default, and it modifies objects that you did not select. The block adds a TagSet carrying the ISDK_Gaze_Fallback tag to the target’s ray interactable, creating a RayInteractable first if the target has none. It then adds an ActiveStateTagSetFilter to each ray interactor on the rig and binds that filter to the EyeGaze active state.
The result is coexistence rather than replacement. While eye tracking is active, ray interactors ignore anything tagged
ISDK_Gaze_Fallback, so the two interactions do not compete for the same object. When eye tracking stops, the filter releases and ray interactors take over that object. To learn about ray interactors, see
Ray Interactions.
The Grab Object variant also installs a hover affordance that paints a soft radial spotlight on the target at the point the user looks at. The block adds it only when it finds a MeshFilter with a mesh assigned on the target or one of its children. The UI Canvas variant does not add it.
The block leaves the target’s own renderer alone. It creates a child GameObject named ISDK_GazeHoverEffect under the mesh-bearing object, and that child carries its own MeshFilter and MeshRenderer pointing at the same mesh, a MaterialPropertyBlockEditor, and the InteractableGazeHover3DVisual component that drives the effect. The renderer uses the GazeHover3D material and the Oculus/Interaction/GazeHover3D shader, so the spotlight overlays the object without changing its material.
Note: InteractableGazeHover3DVisual is experimental. Its Inspector shows the notice “InteractableGazeHover3DVisual is for evaluation purposes only and is subject to change or removal in future updates.”
The spotlight follows the pointer hit position with exponential smoothing, and it supports two spotlights at once, so a left and a right interactor can light the same object together. Select ISDK_GazeHoverEffect to tune it.
| Property | Default | Description |
|---|
Pointables | The GazeInteractable the block created | The IPointable sources that drive the effect. Add every interactable on the object, because events are separated by pointer identifier. |
Radius | 0 | The world-space distance at which the intensity starts falling off. |
Falloff | 0.5 | The world-space distance over which the intensity drops from full to zero. |
Power | 3 | The power of the gradient falloff. |
Color | White at 0.15 alpha | The gradient color. The alpha component dims the intensity. |
Dither | 4 | The dither intensity, which reduces banding at the faint edge of the gradient. |
State Transition Duration | 0.15 | The time, in seconds, over which the spotlight moves from one state to the next. |
Dwell Fade Duration | 1.15 | The time, in seconds, over which the intensity dims after a prolonged hover. Set it to 0 to disable the dwell fade. |
Dwell Fade Value | 0.8 | The final intensity multiplier once the dwell fade completes. |
Position Smoothing Factor | 5 | The smoothing applied to the follow position. Higher is snappier, and 0 disables smoothing. |
To review what the install produced:
Select the object whose name starts with [BuildingBlock] in the Hierarchy.
In the Inspector, look at the Building Block component. Dependencies lists the blocks this one relies on, and Used by lists the blocks that rely on it.
Select the hand interactor groups under the interaction rig and confirm that a HandGazeInteractor is present for each hand.
Select a HandGazeInteractor and confirm that its Candidate Provider field references the GazeConecaster.
Select the target object and confirm that its TagSet contains ISDK_Gaze_Fallback, if you kept ray fallback enabled.
To reconfigure the interactable later, run the matching wizard from the
GameObject >
Interaction SDK menu:
Add Gaze Grab Interaction for an object, or
Add Gaze Interaction to Canvas for a Canvas. The block runs these same wizards, and each one exposes the device types and the ray fallback setting. For background, see
Add Interactions with Quick Actions.
Suppose your scene contains a cube, and you want a user to pick that cube up by looking at it and pinching.
Open your Unity project and select the cube in the Hierarchy.
Navigate to Window > Meta > Tools > Building Blocks.
Locate the Gaze Interaction block and select Add Block.
Choose the Grab Object variant.
The block installs the Interactions Rig and Camera Rig blocks if the scene lacks them, creates the eye gaze system, adds a gaze interactor to each hand, and makes the cube gaze grabbable.
Note: If you add the Grab Object variant with nothing selected, the block installs a cube of its own and applies the interaction to that cube.
Delete the Main Camera in your scene, if one remains. The Camera Rig block replaces it.
With your Meta VR device connected to your computer and selected as the build target, build and run the project.
Put on your device, look at the cube, and pinch your index finger and thumb together to pick it up.
After the block is installed, you can apply the same interaction to more objects without reinstalling it. Select another object and run the matching wizard, as described in
Add Interactions with Quick Actions.