How to get mouse input in VR?

I’m trying to use mouse/keyboard controls in VR but I’m not sure how to make this happen correctly. Using “Get Mouse Position” returns the mouse’s position relative to the viewport’s (not HMD’s) resolution. So do I need to make sure the game starts in full screen and at a locked resolution on the viewport? Otherwise I’m not sure how to get the object in game to correctly correspond to the mouse movement. “Get Viewport Size” gives me the size of the HMD, not the viewport on the monitor, so the “Get Mouse Position” return doesn’t mean anything if I don’t know the monitor size.

Essentially I’m just having trouble getting a cursor in VR. And how can I make sure the game starts in full screen or so I’m unable to click off of the screen while in VR?
This is what I was trying:

Hi, I think you should explain better what you want to do. I mean from a gameplay perspective.
I am no expert here (yet :slight_smile: but I think you’re going go struggle with that mouse thing, cause the mouse cursor works in 2D and you want to see it in a 3D space (your VR app)…see the problem: you’re missing one coordinate. Let’s say you have two boxes one close, one far and not aligned. In your screen, if you’re mouse cursor is over the closest box, to go clic on the other box you’ll just need to move your cursor up or down and left or right, but in the 3D space of the VR view you’ll also need to go furthur or closer to reach the box…and you can’t emulate that with your mouse on the screen.

But you CAN trace from your mouseclicks to any 3-D distance, so that could still work. Maybe a combination of worldspace head tracking and screenspace mouse clicks projecting into worldspace would be good. Point your head where you want to see, and click the mouse within that view frustum at what you want to click.

What’s the approach they use for the VR Editor?