Skip to content

When GazePointerBehaviour set to AlwaysOn the GazeProvider.GazeTarget returns the object from hand #9136

@Mitch753

Description

@Mitch753

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

  1. Add an object to the scene
  2. Change the layer of the object to 31
  3. 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!");
}

  1. Look at the object. The if statement is true, as it should.
  2. Change the camera direction so that the the gaze pointer is not on the object
  3. Enable the hands controller and point with the hand cursor to the same object
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugInput System - GazeWon't FixA real bug, but Triage feels that the issue is not impactful enough to spend time on

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions