Why is mouse locking not functioning in Standalone Game?

If I run an example game based off thirdperson template in a new window or an existing scene window, the mouse cursor locks to the screen (after clicking it initially). This is as expected.

If I run the same thing in an external process window, it captures the mouse to that screen but fails to prevent the mouse going out of the bounds of the screen. Allowing me to click on external windows.

Is there a bug here, or a recommended way of ensuring that mouse cursor stays within the bounds of the screen and non-visible? Its clearly getting mouse delta’s as the view is moving as expected, so its basically just not maintaining capture somehow.

Ta.

Phil.

Hi ,

Can you post your dxdiag for me and provide steps for us to reproduce this? So far we have been unable to reproduce this effect.

Thank you!

Hey ,

Repro steps should be:

Create a project based off third person template. Run it in play mode and you should be able to click in the window and safely run the character around. Note how the mouse is locked within the view. Do the same for play mode using “new editor window” setting. Again it locks the mouse to the view as expected.

Finally select play mode with “standalone game” selected. It runs the game in a new engine instance, but if you move the mouse around, you’ll see it escapes the edges of the view.

Note: This is possibly due to issues with dual monitors. I’ve got a 30 inch and a 24 inch monitor, not duplicated.

Hope this helps!

dx diag

Hey guys…

I uploaded a quick video to show what I mean.

Video

Basically, the final launch of play mode as a standalone doesn’t lock the cursor as the other modes do. You can see the mouse escaping the window in that mode near the end of the video. It might be “as intended” of course. But it seems strange.

Hi ,

I attempted to reproduce this with no results. Are you able to do this in a clean project with no additional code or in one of the provided samples such as Shootergame or Content Examples? Thank you!

Yep, making clean project from first or third person examples does the same thing.

I think I’ve narrowed down a repro case, you’ll need 2 monitors on one graphics card. Basically setup like its dual monitors, but use the “extend these displays” option, I had that setup across my 30 and 24 inch monitors and it seems to not happen when I change them to be distinct displays (i.e. without the extend).

Hi ,

Unfortunately this still is not allowing me to reproduce this effect. Our setup here at Epic is a dual monitor with “extend these displays” active and the mouse is locking to the windows without an issue. Were there any settings in the Editor preferences that you have have altered? Thank you!

hmm, wonder if its some kind of weird nvidia driver issue. Anyways, I have a workaround (just don’t extend displays). So not a huge issue for me anymore.

I didn’t change anything in the editor prefs that would cause it btw. So I’m not sure what is going on.

Hi ,

Since you found a workaround, I will go ahead and mark this as answered, if the issue ends up persisting please feel free to comment here so we can continue trying to assist you. Thank you!