---
title: AFS_UX_Gaze
product: Advanced Framework Pro
version: 1.0
engine: Unreal Engine 5.8
updated: 2026-10-05
canonical: https://docs.human-codeable.com/plugins/afs-ux-gaze.html
---

System

# AFS_UX_Gaze

Dwell-based interaction: look at an object for a configurable time to trigger it, with a filling indicator.

#### What it gives you

- Hands-free interaction for headsets without controllers
- A configurable dwell time per object
- Circular and linear indicator styles
- An accessibility path on every platform

#### Requires

None

#### Required by

None

6 assets21 API members

## Description

Gaze interaction exists for two audiences: headsets without controllers, and users who cannot use controllers comfortably. It works on desktop and mobile too, where it becomes a look-and-wait interaction driven by the camera.

`BPC_PawnAbility_Gaze` traces from the camera each frame. `BPC_Interaction_Gaze` on the target declares a dwell time and an indicator widget, and fires **Progress Finished** once the player has held their gaze long enough. `Interface_Gaze` on the owning actor can veto.

The dwell timer is driven by the same tick-and-timeout pattern as highlighting, so looking away cancels it without any explicit event.

## Setup

1. Enable `AFS_UX_Gaze`.
2. Add `BPC_PawnAbility_Gaze` to the pawn and set **Gaze View Distance**.
3. Add `BPC_Interaction_Gaze` to the target, set **Trigger Time** and pick a **Widget Progressbar**.
4. Bind to **Progress Finished**.

## Usage

### Tuning dwell

**Trigger Time** is the dwell duration. Under about 0.8 s users trigger things accidentally; over about 2.5 s it feels unresponsive.

### Choosing an indicator

`Widget_GazeIndicator_Circular` reads well on small targets; `Widget_GazeIndicator_Linear` suits wide ones. Derive from `Widget_GazeIndicator` for your own.

### Vetoing

Implement `Interface_Gaze` and return false from `CanGazeView`.

[![The dwell indicator part-filled on a gazed object](../images/AFS_UX_Gaze_result-1600.webp?v=f3ee676a)](../images/AFS_UX_Gaze_result-1600.webp?v=f3ee676a)

The dwell indicator part-filled on a gazed object

## Key properties

| Property | When to change |
|---|---|
| `Gaze View Distance` | How far gaze reaches from the camera |
| `Trigger Time` | Dwell duration per object |
| `Widget Progressbar` | Indicator style |
| `Sound Progressbar` | Audio feedback while dwelling |

## Extending

Derive from `Widget_GazeIndicator` and override `SetProgress` for a custom indicator.

## Performance notes

Performance

The gaze ability raises its own tick interval when nothing is hovered, so idle gaze is cheap. Keep **Gaze View Distance** no longer than the scene needs.

## Example map

`Map_Examples_Gaze` shows dwell interaction on several object types.

## Troubleshooting

**The indicator never appears.** **Widget Progressbar** is empty, or the object's collision does not block the gaze trace.

## API reference

Every blueprint asset in this plugin. Expand an asset to see its members.

### Components

**BPC_Interaction_Gaze**8 members

extends `BPC_Interaction` · implements `OutsidePawnRPCInterface`

Interaction that responds to being looked at. While a pawn's gaze ability holds its trace on the owner, an indicator appears just off the surface facing the camera and fills over Trigger Time, then fires. Add it to any actor that should be worked without a controller, set the indicator widget and the time, and implement the gaze interface on the owner if it needs to refuse a gaze.

| Kind | Name | Signature | Description |
|---|---|---|---|
| var | `Widget Progressbar`Progressbar | `class<WBP_Base>` | Indicator widget shown while the player dwells on this object. Choose the circular or linear variant, or subclass for your own. |
| var | `Buildup Time`Progressbar | `float` | Seconds the gaze has to be held before it fires. Tick Highlight opens a gated delay of this length while the gaze stays on the owner and raises Progress Finished when it elapses, so this is the number that decides when a gaze triggers. It is separate from Trigger Time, which the indicator is spawned with, and the two defaults are not the same. |
| var | `Trigger Time`Progressbar | `float` | How long the player must keep looking at this object before it triggers, in seconds. |
| var | `Sound Progressbar`Sound | `SoundBase` | Sound played while the dwell indicator fills. |
| fn | `CalculateLocationAndRotation`Default | `(Pawn: Pawn, Impact: Vector, out Location: Vector, out Rotation: Rotator)` | Works out where to place the dwell indicator and how to orient it towards the player. |
| fn | `CanGazeHighlight` | `(HitComponent: PrimitiveComponent, SourceInfo: ST_SourceInfo, out CanHighlight: bool)` | Returns whether this object currently accepts gaze, consulting Interface Gaze on the owner if it is implemented. |
| event | `TickHighlight` | `(SourceInfo: ST_SourceInfo, TraceResult: HitResult)` | Keeps the gaze alive for this frame and advances the dwell timer. Triggers once Trigger Time is reached. |
| event | `ProgressFinished` | `()` | Fires when the dwell completes. Bind to this to run the gaze action. |

**BPC_PawnAbility_Gaze**1 members

extends `BPC_PawnAbility`

Pawn ability letting a pawn work things by looking at them. Each tick it reads the pawn's latest trace and, where the hit actor carries a gaze interaction willing to be gazed at, keeps that interaction's highlight alive and puts the pawn into the gaze interaction state. Add it to a pawn to grant gaze; it needs the pawn to answer the trace interface.

| Kind | Name | Signature | Description |
|---|---|---|---|
| var | `Gaze View Distance`Settings | `float` | How far the gaze trace reaches from the camera. |

### Helper

**BP_Helper_GazeIndicator**7 members

extends `Actor`

Indicator actor showing how far a gaze has progressed: a widget component carrying the progress widget, a sound that rises with the fill, and a timeline run at the interaction's trigger time. The gaze interaction spawns and destroys one per gaze, so this is not an actor to place.

| Kind | Name | Signature | Description |
|---|---|---|---|
| var | `Progress Bar`Settings | `class<WBP_Base>` | Widget class used to draw the dwell progress. |
| var | `Progress Sound`Content | `SoundBase` | Sound played while the indicator fills. |
| var | `Timer`Settings | `float` | Seconds the indicator takes to fill. Written in as the indicator is spawned and read once at begin play, which starts the bar over that duration, so the class default of zero is never the value that is used. |
| var | `Action Icon`Content | `Texture` | Icon drawn in the middle of the indicator, handed in as it is spawned. The circular widget reads it while initialising and collapses its icon border when nothing is set, so leaving it empty simply shows the ring on its own. |
| event | `PlayProgressBar` | `(Duration: float)` | Starts filling the indicator over the given duration. |
| event | `HideAndDestroy` | `()` | Fades the indicator out and destroys it. |
| event | `SetDesiredPosition` | `(Transform: Transform)` | Stores the transform the indicator should be moving towards, which the gaze interaction supplies each frame as the gaze point shifts across the surface. Begin Play seeds it with the indicator's own spawn transform. |

### Interfaces

**Interface_Gaze**1 members

extends `Interface`

Contract an actor implements to decide for itself whether it may be gazed at. The gaze interaction asks Can Gaze View, passing itself and the source info, before starting the fill. Implement it on the owning actor when gazing depends on the actor's own state; without it, every gaze on an active interaction is allowed.

| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | `CanGazeView`GazeView | `(GazeComp: BPC_Interaction_Gaze, SourceInfo: ST_SourceInfo, out CanHighlight: bool)` | Implement on an actor to veto or allow gaze under your own conditions. Returning false suppresses the gaze highlight and dwell. |

### Widgets

**WBP_Gaze_Circular**2 members

extends `WBP_Base`

Circular gaze indicator: a radial progress material that sweeps round and brightens as the gaze fills. Progress Updated is called with the new value as the dwell advances, which is the only event a replacement has to implement. The default indicator; point a gaze interaction's progress bar at it unless a bar reads better.

| Kind | Name | Signature | Description |
|---|---|---|---|
| event | `WidgetElement_PostInitiate`Style | `()` | Called on every element once the entire tree has been initiated and themed. Implement it for set-up that needs the finished tree, such as measuring or reading the state of a sibling. |
| event | `ProgressUpdated_Event` | `(NewProgress: float)` | Bound to the indicator's Progress Updated and pushes the new fraction into the circular progress bar. Nothing else happens here, which is why a design of your own only has to answer this one event. |

**WBP_Gaze_Linear**2 members

extends `WBP_Base`

Gaze indicator drawn as a horizontal bar rather than a ring, filling as the gaze progresses. Set it as a gaze interaction's progress bar where a bar suits the design better than a circle; it implements the same Progress Updated event as the circular one.

| Kind | Name | Signature | Description |
|---|---|---|---|
| event | `WidgetElement_PostInitiate`Style | `()` | Called on every element once the entire tree has been initiated and themed. Implement it for set-up that needs the finished tree, such as measuring or reading the state of a sibling. |
| event | `ProgressUpdated_Event` | `(NewProgress: float)` | Bound to the indicator's Progress Updated and pushes the new fraction into the horizontal progress bar. Nothing else happens here, which is why a design of your own only has to answer this one event. |
