Hey everyone,
So I’m trying to create a GUI interface for this VR app I am creating. I’m trying to use Unity’s UI system and created a canvas and several buttons, all in world space as suggested by Unity. Now along with this I created a reticle in the center of the player’s camera, with the idea being that the player can aim at what button they want to press, and then press the “A” button on the controller to press it.
Now here’s the issue. The raycast I have on my camera does not seem to detect any of the GUI elements, passing right through it and not giving me any output on my Raycasthit variable. Other surfaces and objects detect just fine though. I’ve been searching all over as to what this might be; adding the main camera as event camera, checking raycast targets on the GUI objects, checking if there’s any collider in the way, but nothing seems to work. I looked up the way Unity did it in their VR samples project, but they don’t even seem to be using their own GUI system for the main menu.
It is sort of important to get this working with Unity’s GUI system, as most of the work I’ve done and plugins I use are dependent on this. If anyone could help me out with this, that would be great!