-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the bug
When the GazePointer behaviour is changed through:
PointerUtils.SetGazePointerBehavior(PointerBehavior.AlwaysOn)
If hands are detected, the GazeProvider returns the object highlighted by the hands:
CoreServices.InputSystem.GazeProvider.GazeTarget
To reproduce
- Add an object to the scene
- Change the layer of the object to 31
- Create a script with the following code:
void Start()
{
PointerUtils.SetGazePointerBehavior(PointerBehavior.AlwaysOn);
}
void Update():
if (CoreServices.InputSystem.GazeProvider.GazeTarget?.layer == 31)
{
Debug.Log("Gaze!");
}
- Look at the object. The if statement is true, as it should.
- Change the camera direction so that the the gaze pointer is not on the object
- Enable the hands controller and point with the hand cursor to the same object
- The above if statement will be true, even if we are not gazing at it.
Expected behavior
Expecting to receive a null object from the GazeProvider when pointing the object with the hands controller, but instead receiving the object focused by the hands.
Your setup (please complete the following information)
-
Unity Version: 2019.4.9f1 and 17f1
-
MRTK Version: 2.2 and 2.4
-
Tested in the editor and the device (HL2)
Target platform (please complete the following information)
- HoloLens 2
Additional context
I'm not sure if this is the expected behaviour but it seems highly counter intuitive.
Since we need to have the gaze cursor always visible, this breaks all the object placements we use in our app. If you have any suggestions how to differentiate between the 2 inputs (gaze, hands) they are welcome.