Reply To: I am unable to interact with buttons in VR (Oculus)

Forum Archive I am unable to interact with buttons in VR (Oculus) Reply To: I am unable to interact with buttons in VR (Oculus)

#27481
Jonathan Gonzalez
Participant

    UI within VR needs to be more “physical”. The default UI system uses a mouse hover or touch on a screen to determine if the player is interacting with it, but with world space elements it acts like a 3d object so it doesn’t know when you’re “hovering” over a button. 

    You’ll need to use a raycast along with a line renderer (to see it more clearly in game) to simulate a laser pointer. Then with that raycast you can detect the button. 

    A more physical way is to use 2D sprites as game objects with a collider. Players can then physically reach out and press them or also use a raycast. I can write up an article on creating VR based UI systems to better explain it. I have worked with UI quite a bit in VR lately so it’ll be good to get that “on paper” for others to learn from as well.