Search Unity

How to interact with OculusHome-like UI

Discussion in 'AR/VR (XR) Discussion' started by sapanda88, Mar 19, 2015.

  1. sapanda88

    sapanda88

    Joined:
    Mar 20, 2014
    Posts:
    12
    Hey Folks,

    I'm really new to Unity, and I'm currently trying to create a menu similar to Oculus Home - a bunch of UI elements on a fixed world space plane, and I'd like to select an element by looking at and tapping on it. What's the best way to go about doing this? Just looking for someone to point me in the right direction, sample code would be super helpful too :)

    Thanks,
    Saswat
     
  2. HelloMeow

    HelloMeow

    Joined:
    May 11, 2014
    Posts:
    281
    I've seen two ways of doing this. The first is you add colliders on UI GameObjects and do a raytrace from the center anchor of the camera in it's forward direction. If it intersects with a button you select it. Make a timer to "click it", or just use a key press.

    The other method is by making a new inputmodule that uses the EventSystem more directly.
    https://forums.oculus.com/viewtopic.php?t=16710
     
  3. shakhruz

    shakhruz

    Joined:
    Feb 17, 2011
    Posts:
    43