Eye gaze and far interaction don't work together
Describe the bug
The gaze pointer gets disabled when far-interaction hand pointers are created. This works ok for the default head-gaze, but it breaks the concept of combining eye tracking with hand interactions.
https://github.com/microsoft/MixedRealityToolkit-Unity/blob/9abf0a1eac906c7ffae688ffd5b5d125202f4ca7/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs#L68
To reproduce
- Enable eye tracking simulation
- Enable "Simulate eye position" in the input simulation profile
- Check "Use eye tracking" (formerly "Prefer eye tracking") on the main camera's GazeProvider
- Enter play mode
- Notice the gaze pointer dot in the center of the screen
- Bring up hand by holding spacebar
- Gaze pointer is disabled
Expected behavior
Gaze pointer stays active when using eye tracking.
To clarify: The problem occurs when far interaction is enabled and the hand rays are created. It works in the eye tracking example because far interaction seems to be disabled there.
Hi @lukastoenneMS, could you give me an example on how you want to combine far hand rays with eye tracking? As shown in some of our ET sample scenes, it is possible to use eyes + hands to select far targets and to move them. The problem only occurs when you use two conflicting far interaction techniques at the same time: namely hand rays and eye gaze.
Two scenarios were mentioned:
- Using a bounding box for resizing that interacts with the hands (near/far), and a slate inside it that can be scrolled with eye gaze. These would be totally separate, so no conflict between far interactions. Whether it's good UX design i can't tell though, perhaps you have a suggestion for doing it a different way?
- Recording all eye and hand movements during a session for training/analytics. In the code at least it looks like the gaze pointer is not destroyed outright, but just disabled for interactions, so recording it would still be possible.
In both cases, however, it seems that you'd have to disable the hand far interaction in advance (via pointer profiles?) to allow eye gaze to work at all while hands are visible.
Possible bug: When the hands lose tracking and their pointers are removed again, the eye gaze is not being re-enabled (same in input sim and on device).
Possible bug: When the hands lose tracking and their pointers are removed again, the eye gaze is not being re-enabled (same in input sim and on device).
Are you on the latest mrtk_development branch? There was a bug on this, which should be fixed now though: #4482. If not, then yep, that's definitely a bug.
Adding @wiwei for awareness.
Two scenarios were mentioned:
- Using a bounding box for resizing that interacts with the hands (near/far), and a slate inside it that can be scrolled with eye gaze. These would be totally separate, so no conflict between far interactions. Whether it's good UX design i can't tell though, perhaps you have a suggestion for doing it a different way?
- Recording all eye and hand movements during a session for training/analytics. In the code at least it looks like the gaze pointer is not destroyed outright, but just disabled for interactions, so recording it would still be possible.
In both cases, however, it seems that you'd have to disable the hand far interaction in advance (via pointer profiles?) to allow eye gaze to work at all while hands are visible.
Yes, scenario 2 shouldn't be a problem. Hm, yes, scenario 1 is currently not supported. Again, at least not if you want to use the auto scroll with the BaseEyeFocusHandler which handles the currently active primary input pointer(s). From our side, I think it's not enough to just "not disable" the eye focus handler when the hand rays are present, as this may have other unexpected results. Instead we would have to rework how we think about primary and secondary pointers and where "commit actions" (e.g., airtap, clicker, etc.) are channeled to in presence of multiple pointers. @keveleigh and @wiwei: Who would be the best people to talk to this about to agree on a consistent and user-friendly design?
@lukastoenneMS In the meanwhile to unblock you/our customers: To support scenario 1, replace the BaseEyeFocusHandler in the auto scroll script with explicit polls of the eye gaze data byusing EyeGazeProvider.GazeOrigin and GazeDirection. I may actually rewrite the EyeTrackingTarget script to allow to work independently for eyes. Let me look into that.
@wiwei @keveleigh Any objections to make EyeTrackingTarget independent from BaseEyeFocusHandler? There have been several requests now to use eye tracking as a context indicator in combination with hand input.