Problem with mouse position in VR

Hi, I would like to use the mouse in a VR game for interacting with objects.
In order to do that, I trace a line from the cursor to see if the mouse is hover an actor.

The problem is that it works perfectly when in normal screen but in VR it seems all the nodes relative to screen location don’t work as expected!

I tried GetHitResultUnderCursor, ConvertMouseLocationToWorldSpace etc. but the trace is never where the cursor is.

How can I do this simple task in VR?

This is a known bug… DeprojectScreenPositionToWorld not working properly with HMD - Rendering - Epic Developer Community Forums

Thanks for your answer.

I think I managed to get it working but there is another problem: the viewport for the mouse seems to be restricted to 1280x720 when in VR mode.

Do you know if it’s another bug and if there is a workaround for that?


Initially the viewport should be restricted to your hmd resolution. You can increase the target render by resetting the hmd screen percentage via…

hmd sp 200

The default is 100. 200 is a double of the size in both dimensions.

I know the screen percentage but I tried it and unfortunately the mouse viewport size is not affected by the SP.

I guess this is another VR related bug but I can’t find any resource about it.

How did you get it working?