microsoft / OpenXR-Unity-MixedReality-Samples

Sample Unity projects to demo how to use OpenXR plugin in Unity for HoloLens 2 and Mixed Reality headsets
MIT License
245 stars 70 forks source link

Eye tracking calibration prompt #185

Closed camnewnham closed 4 months ago

camnewnham commented 4 months ago

At present, if eye tracking is enabled in a Unity OpenXR App the user will always:

  1. Be prompted for permission if not granted
  2. Be prompted to calibrate if not calibrated

Is there a way to control whether or not these prompts are shown? Or the timing of them?

I'd like to use eye tracking if the user has calibrated, but if they haven't, then don't worry about it.

camnewnham commented 4 months ago

OK.. based on the docs: https://learn.microsoft.com/en-us/windows/mixed-reality/develop/advanced-concepts/eye-tracking-calibration

I will try:

  1. Don't enable any InputActions that use Eye Tracking
  2. Check for EyesPose::IsCalibrationValid
  3. If valid pose (or not running in UWP), then enable said input actions.

I'll re-open this issue if this doesn't work.

It would be great if this was configured as an OpenXR feature instead!