Skip to content

Gaze and Fixations

Gaze and Fixations are closely related. Gaze records the HMD position over time and the direction of the eyes at a set interval. Fixations use a dispersion technique to identify where the participant's eyes are steady and maintaining focus.

When using an HMD without Eye Tracking, Fixations will not be recorded and Gaze will assume the participant's focus is directly in front of the HMD.

Gaze

The PhysicsGaze component, included on the Cognitive3D_Manager prefab, automatically captures gaze data. Gaze on dynamic objects, including Canvas and UI Image elements, is recorded when those objects include a Dynamic Object component and are exported and uploaded to the Cognitive3D platform from the SDK in Unity.

To enable gaze tracking on Canvases, select Enable Canvas Gaze. This allows gaze data to be recorded on active Canvas rects without requiring colliders. PhysicsGaze component on Cognitive3D_Manager prefab

  • Canvas Cache Behaviour – Determines how Canvases are cached. Available options include:
    • Find Each Scene Load – Finds Canvases in the scene once when a scene loads.
    • List Of Canvases – Captures gaze only on the Canvases defined in the target list.
    • Find Objects Always – Continuously searches the scene every frame for active Canvases.

      Note: The Find Objects Always option offers flexibility when spawning Canvas prefabs dynamically, but it may impact performance since it searches for active Canvases every frame.

  • Canvas Refresh Behaviour – Defines how the system handles canvases when they are destroyed. This setting is primarily used when Canvas Cache Behaviour is set to Find Objects Always or List Of Canvases. Available options include:
    • Trim List – Removes destroyed canvases from the cached list.
    • Find Objects – Searches for canvases whenever one is destroyed and updates the cached list with any active canvases found.
  • Target Canvases – Displays the list of canvases you want to track within your scene. This list is used when Canvas Cache Behaviour is set to List Of Canvases.

Note

Draw Debug Lines allows you to visualize gaze behavior during editor sessions by displaying both the gaze ray and hit points on surfaces. This option is intended for debugging purposes only and should remain disabled during regular use.

Fixation Setup

For most XR SDKs, fixation tracking is handled automatically once the required Unity packages are installed. However, for some devices, such as the Vive Pro Eye, you’ll need to integrate a third-party eye tracking plugin to record Fixations data. For example, import the SRanipal SDK for Vive Pro Eye.

After importing, open the Scene Setup Window from the Cognitive3D > Legacy menu and select the appropriate SDK. Press Next through the setup steps until the project re-compiles, then close the window.

Fixation Recorder Component

When using an SDK with supported Eye Tracking, the Fixation Recorder component will be added to the Cognitive3D_Manager Game Object on Start if it is not already present. If you wish to configure recording Fixations you can add this component and modify these values in the Editor. A high level summary is available on the Fixations page.

The default values are taken from several academic papers and should be suitable for most projects.

Note: all times are in milliseconds

  • MaxBlinkMS - The maximum amount of time that can be assigned as a single 'blink'. If eyes are closed for longer than this we assume that the user is consciously closing their eyes
  • PreBlinkDiscardMS - When a blink occurs ignore gaze preceding the blink up to this far back in time
  • BlinkEndWarmupMS - After a blink has ended ignore gaze up to this long afterwards as the participant re-focuses

Fixation

  • MinFixationMS - The time that gaze must be within the MaxFixationAngle before a Fixation begins
  • MaxConsecutiveDiscardMS - The amount of time gaze can be discarded before a fixation is ended. Gaze can be discarded if the eye tracker returns unexpected values
  • MaxFixationAngle - The angle that a number of gaze samples must fall within for a Fixation to begin
  • MaxConsecutiveOffDynamicMS - Amount of time gaze can be off the transform before fixation ends. Mostly useful when Fixation is right on the edge of a Dynamic Object
  • DynamicFixationSizeMultiplier - Increases the MaxFixationAngle on Dynamic Objects. Helps reduce incorrect Fixation ending, especially on Smooth Pursuit Fixations
  • FocusSizeFromCenter - This curve increases the size of the MaxFixationAngle as gaze gets toward the edge of the viewport. This is used to reduce the number of incorrectly ended fixations because of hardware limits at the edge of the eye tracking field of view

Saccade

  • SaccadeFixationEndMS - Amount of consecutive eye samples before a Fixation ends as the eye fixates elsewhere. This is the most common way of fixations ending

intercom If you have a question or any feedback about our documentation please use the Intercom button (purple circle) in the lower right corner of any web page or join our Discord.