3D widget mouse cursor vis and control in VR

Hi all,

There are a few related threads already for this, but I am yet to find any specific solutions.

I have a 3D widget component on my player pawn, that acts as a main menu for my game. I’m trying to set up a menu selection system that works like the oculus store, where if in VR, and the widget is visible, the mouse cursor locks to the center of your view wherever you turn your head. So I want to drive the cursor position with the oculus rift headset, not mouse movements.

So far I have two issues:

1: I can NOT get the mouse cursor to display either on the widget or in the game itself. I’ve turned on the “show mouse cursor” in the class defaults on my player controller. I’ve also set cursor display and type as show in the screenshot below. I don’t know if this is a VR related issue specifically

2: I don’t know how to lock the cursor position to the center of the headset view. I tried doing a line trace from the camera, to the widget, which returned the correct hit location in world space, but I could not project that position onto a 2d coordinate of the widget.

3: movement control of the cursor seems to be dual controlled by the mouse itself, and the movement of the headset. I’ve set the widget buttons to change colour when the cursor is on them even if I can’t see the cursor itself - I can see that it is responding to both headset and mouse movement. Ideally I only want the headset to drive the mouse position.

Any tips would be great. Thanks.