Gaze attention quick start
Enable gaze attention on the Convai Player Component and verify that a character responds when the player looks at a tagged world object.
Enable gaze attention on UConvaiPlayerComponent, tag a world actor so it can receive attention, and verify that the Convai character acknowledges the object after the player holds their gaze on it. By the end, the character will react when the player looks at the actor for the GazeAttentionDelay duration (default: 1.0 s).
Prerequisites
Confirm the following before you enable gaze attention:
The Convai Unreal Engine plugin is installed and the API key is configured. See Install the Convai plugin.
Your level contains a
UConvaiChatbotComponenton the AI character and aUConvaiPlayerComponenton the player pawn, with a validCharacterIDand a working microphone session.Enable Actions is checked on the chatbot. Select the chatbot in the Outliner, open
UConvaiChatbotComponentin the Details panel, expand Convai | Actions → Environment, and confirm Enable Actions (bEnableActions) is on. Gaze attention writes to the chatbot's attention slot, which requires the actions system to be active at session connect. If actions are not set up yet, follow Character actions quick start first.
Enable gaze attention and tag an object
Set the response mode
Set Gaze Should Respond (GazeShouldRespond) to Always. The default is Never, which updates the attention slot silently without requesting a spoken reply from the character.
In Gaze Attention Text (GazeAttentionText), type a short sentence such as "The player is looking at this object.". Convai uses this text as a narrative event when attention is promoted.
Tag a world actor
Click any prop in your level — a crate, door, or piece of equipment. In the Details panel, click Add Component and search for Convai Object Component. Select it to add a UConvaiObjectComponent.
Expand Convai | Object and set:
Name — a short label, for example
"SafetyValve".Description — one sentence, for example
"A red emergency valve on the west wall."
Under Convai | Object | Gaze, confirm Gazeable (bGazeable) is checked. When bGazeable is false, the object is excluded from the gaze pipeline entirely.
Enter Play mode and look at the object
Press Play. Center your crosshair on the tagged actor and hold it there.
You should see three stages of feedback:
Immediately — a visual highlight appears on the object (pale-yellow overlay on UE 5.3+, wireframe box on UE 5.0–5.2) and the center cursor dot turns white.
After
GazeAttentionDelayseconds (default 1.0 s) —OnAttentionGainedfires and the chatbot's attention slot updates.Shortly after — the character begins speaking, because
GazeShouldRespondis set toAlways.
If the highlight never appears, see Troubleshoot gaze attention. If the highlight appears but the character stays silent, confirm Enable Actions, GazeShouldRespond, and GazeAttentionText on the player component.
Next steps
How gaze attention worksGaze attention referenceGaze attention usage examplesLast updated
Was this helpful?