Skip to main content
Version: 14 Oct 2024

Magic Leap Eye Tracker Feature Overview

The Magic Leap OpenXR Eye Tracker Feature provides developers with the ability to access and utilize the Magic Leap device's eye-tracking capabilities. This includes tracking gaze direction, pupil size, eye openness, and other eye-related data. This feature is essential for applications that require precise user attention tracking, gaze-based interaction, or other advanced eye-related analytics.

NameSpace
using MagicLeap.OpenXR.Features.EyeTracker;
Calibration

Developers should use the Magic Leap User Calibration OpenXR feature to determine if eye tracking is properly calibrated before querying data.

caution

Some functions require the com.magicleap.permission.EYE_TRACKING and com.magicleap.permission.PUPIL_SIZE permissions to be requested at runtime and enabled in your project's Manifest Settings (Edit > Project Settings > Magic Leap > Manifest Settings).

caution

This feature requires the Magic Leap 2 Eye Tracker OpenXR Feature to be enabled in your project's OpenXR Settings (Window > XR Plugin Manager > OpenXR Settings).

Key Features

Eye Tracking Data: The Magic Leap Eye Tracker API provides detailed data on the user's eye movements, including:

  • Gaze Direction: Track where the user is looking.
  • Pupil Size: Measure the user's pupil diameter.
  • Eye Openness: Monitor how open or closed the user's eyes are.
  • Gaze Behavior: Monitor specific eye behaviors, such as saccades, fixations, and blinks.

Eye Tracker Structures

The Magic Leap Eye Tracker API provides several structures that facilitate the retrieval and use of eye-tracking data:

  • MagicLeapEyeTrackerFeature.EyeTrackerData: Contains all data associated with eye tracking, including static data, geometric data, pupil data, and gaze behavior.
  • MagicLeapEyeTrackerFeature.StaticData: Provides static information about the eye tracker hardware, such as the maximum eye camera dimensions.
  • MagicLeapEyeTrackerFeature.GeometricData: Describes geometric attributes of the eyes, such as openness and position within the skull.
  • MagicLeapEyeTrackerFeature.PupilData: Provides data on pupil size, gated by the PUPIL_SIZE permission.
  • MagicLeapEyeTrackerFeature.GazeBehavior: Provides detailed information about the user's gaze behavior, including type, duration, velocity, and confidence.

These structures and enums are essential for handling and interpreting eye-tracking data within your application.

```