Mouse not locked/focused to window on start

I have checked for this issue through these forums and saw it has been a common issue. When I hit launch in editor I must click on the window, in order to use my mouse in my project to click on “Start game”. When I package the game, and launch from the packaged game, I must click on the window in order to focus it, to click on start game. Furthermore, after I click on start game which opens my first level, the mouse becomes unlocked and the screen becomes unfocused AGAIN, and I must click on my screen, for it to work normally.

The controller is set to show/use mouse. How can I make the window automatically focused?

I have also attempted to force the focus to the window with the blueprint for setting input to game mode, which some people have said worked for them, but I haven’t gotten any change after adding it to my project.

Hello Zennith997,

I’m using the Top Down template as a frame of reference since it also uses mouse controls and I’m seeing the issue you mention with launching from the editor, but not the issue with launching a packaged game. Can you check the Viewport Properties under Project Settings > Engine > Input? The default settings in Top Down are as follows:

Hey Matthew, thanks for taking a look into this for me.

My settings have been on the same as the photo you provided. Capture mouse on launch is checked, and the following settings are the same as well. I am using a third person project with three levels. The first level, my games default level is the main menu. I have my buttons set to highlight on hover, if I do not click on my games window first to focus windows to the game, I am unable to click my “start game” button. (I even have it set to full screen on launch, which works, but still does not focus the window and I am still left with the problem of needing to click on the window)

Again, secondly, after hitting start game, to load my next map, the window becomes unfocused again, my mouse becomes visible (Which it shouldn’t in a Third person shooter), and I am unable to control my camera with my mouse until I click on the window a second time.

If it helps, here is my packaged project without editor. I can upload the editor version if it would help determine the issue further, albeit over some time as my internet is… Underwhelming. Thank you for the assistance.

https://drive.google.com/open?id=0Bw4XNvtP_BgRMG92M2pWQnBKek0

There is definitely something wrong here, as you can tell the window does actually have focus as far as Windows is concerned by hitting Alt+Tab and holding onto Alt. The process being the first in the list shows that it has focus but the mouse isn’t being taken. Unfortunately I can’t glean more than that from the packaged game itself. If you could upload the full project that would be helpful. It shouldn’t be too large if you only include the .uproject file along with the Content, Config, and Source (if applicable) folders. Intermediates are the bulk of the size and don’t need to be included.

If you would rather it be private, you can send a link to the download to me on our through a private message.

[1]:

No problem! My intermediate folder is only 7Mb, where as the other two folders are adding up to 1GB after zipping, not sure what you ment by intermediate is the largest >.>;

Anywho, I am uploading the 1GB project to my google drive now at 100KBps. I will respond to you again when it is finished and will get you the link. I am guessing about 3-4 hours.

It’s not an important project, I am quite new (about a week) into Unreal engine 4 for the very first time (My first engine.) and I’m having a blast. This project was to attempt learn different blueprint mechanics and trying new things to learn. :slight_smile:

Alright, it’s uploaded, here’s the link for the project.

https://drive.google.com/open?id=0Bw4XNvtP_BgRUU5jeWJDcVVrUGc

If you’re able to figure out what’s going on, it would be a huge help. I hope I don’t just have some setting somewhere toggled off.

Thank you for the upload. Usually the intermediates are the largest part. The difference in this case is that you have Starter Content included which is likely where most of your Content folder’s size is coming from, 625 MB of it to be exact.

I was able to reproduce this myself, outside of your project. This seems like it is specific to Widgets as the mouse is taken into account otherwise. I’ve placed a bug in for this which you can find here: UE-42455

Likely the easiest way to workaround this in the meantime, for demoing purposes, is to add a splash screen that requires you to click in the window to continue which is activated by a simple click event. It can then transition to the screen with your start button.