Search Unity

Question XR Interaction & New Input System - Gaze interaction

Discussion in 'XR Interaction Toolkit and Input' started by Korveen, Jul 1, 2020.

  1. Korveen

    Korveen

    Joined:
    Jan 24, 2015
    Posts:
    12
    Hello!
    In my project, UI is controlled by Gaze or by pressing trigger at controller (like xbox) or keyboard button.

    I can’t combine the New Input System with XR Interaction.
    Can anyone help or give an example. When we look at the UI element with the camera rig, and then press the button to interact with UI. I do not need to use VR-controllers.
    Im try to added XR Ray Interactor and XR Controller components to the camera. when hovering the UI - it is activated, but I can not find the parameter for linking the keyboard (or xbox controller) to interact.
     
  2. Polff

    Polff

    Joined:
    May 18, 2017
    Posts:
    30
    It's cardboard timer based interaction, but have a look here.
     
  3. Korveen

    Korveen

    Joined:
    Jan 24, 2015
    Posts:
    12
    Thx, good example. it's close to what i need. hope, I can link the controller click and then where I look
     
  4. juliens137

    juliens137

    Joined:
    Oct 2, 2017
    Posts:
    26
    hey @Korveen did you ever figure it out? I'm trying to do something similar with UI
     
  5. Korveen

    Korveen

    Joined:
    Jan 24, 2015
    Posts:
    12
    I had to look for a custom Gaze UI solution and redo some things.
     
  6. hiab-x

    hiab-x

    Joined:
    Apr 14, 2013
    Posts:
    34
    I'd be interested to know if anyone found a working solution to the above. Google's APK has been deprecated, the Asset store has a free Gaze UI which works as intended during edit works, fails to actually work in final build. I'm using Unity 2020.3 for a VR project requiring one button press, ideally gaze activated. So far looking for answers has been zilch.
     
  7. Layfully

    Layfully

    Joined:
    Oct 13, 2015
    Posts:
    2
    I found out how to do it. You can use above interactor and use graphics raycaster to cast ray in the middle of the screen and check if it hit something.