3D Widget VR Interaction?

Hey guys,

Can anyone give me any suggestions about you would go about interacting with 3D widgets in VR (specifically for GUIs/menus)?

I understand that you would need to raycast from the HMD to the 3D widget, but I can’t for the life of me work out how to select individual buttons within the 3D widget using raycasting alone (rather than a mouse cursor), or how to hover/select individual buttons with a combination of raycasting coupled with, for example, the ‘A’ button on an Xbox controller, or the touch-pad on the Gear VR, to select/press the button.

There doesn’t seem to be much out there on this topic so any advice would be hugely appreciated!

I’d wait until the Oculus touch control come out before attempting anything like this. If they’re anything like the Vive controls, in that you can map them directly to the game world, then this will be a breeze. For example, click to teleport took less than 5 minutes to do with the Vive motion controller.

What you’re wanting to do would be complicated because the only 3 dimensional tracked object you have, is your head, which has 2 perspectives so you can’t just to a trace from the middle of the screen as you can in normal FP camera games.

I was wondering this as well and on reddit a nice user posted a workaround and a sample project file.

hello, I was able to setup a working gaze method + controller input for interaction in VR, it does not make use of raycasting since that method requires also to setup hidden geometry to the relative location on the widget and it’s very time consuming. Instead I choose to use the mouse pointer, fixing it at the center of the viewport, using a custom function from rama’s victory plugin (set mouse position). getting the buttons to work required a bit more work since the fastest option was to simulate a click event on controller button press (which rama plugin seems to include, but I could not find that one). So I made a function that checks on tick if a button is hovered, and if that’s the case, it sets focus on that element. By doing so, the action button on controller always activate the element that you are looking at. I found out that this workflow is quite fast in setting up, since mostly of your umg works out of the box.