Download

How to display a cursor in VR (is it even supported)?

Hi,

I’m currently in the process of converting my project to VR and one of the issues I am facing is that the cursor is not displaying in VR mode.

Is it possible to display the standard cursor in VR mode?

And if not, how do I implement a 3d cursor that can interact with UMG?

Thanks,

Onoa

I’m not sure about a 3D cursor, but the solution seems to be for most people to do a trace for what you’re looking at. Or a trace from the motion controllers if you have those.

I’m interested in seeing if there’s an easy way for a 3D cursor too.

I feel like they de-emphasize mouse use as much as they can because it makes some people nauseous. I find that a shame. The best VR games, imo, use the mouse. For me it’s just the most immersive. But even Unreal doesn’t seem to play well with it… you can move your mouse off screen for example and if you click it unfocuses the game. Really annoying. Interested in a solution to that, too.

1 Like

Euro Truck Simulator and Elite Dangerous have a cursor in VR. I found it doesn’t cause nausea, Its a separate level that is loaded or streamed.

If the mouse doesn’t influence the camera movement, it shouldn’t cause nausea.

For UMG in VR, the best way is to copy what Epic did inside the VR Editor. You could try to understand what they did by digging through the source code and implement you own version.

If you don’t know C++, it probably won’t work very well. You could either use hitboxes on your WidgetComponents and LineTrace to see if you hit them. Or have a look at the unoffial VR Content Examples.

Currently, my menus are actually 3D and I am able to interact with them with the standard mouse (UMG mouse is able to interact with 3d objects / through raycast I am assuming). But in VR , the mouse doesn’t even appear. So I am wondering if the mouse exists at all in VR and if I can access and use its coordinates and if so how do these values relate to the HMD coordinate space.

1 Like

I know this answer is coming in way late, I just came across this post and wanted to provide the answer in case anyone else is looking for it. For VR, you want to add a Widget Interaction Component to your VR character, attach it to the desired location (such as index finger), and then flip the Show Debug variable in that component to true/false to show/hide the trace line when needed (presumably, either when a widget is opened at all or when you point in the direction of the widget, which you can detect with a trace from the finger). You can then add the “Press Pointer Key” node and bind that to the Left Mouse Button to trigger mouse clicks wherever the debug trace hits.