Mouse controls not functioning as expected while playing in editor

Please bear with me as I will surely provide too much info for this question…

Our team has be working with UE4 for several months now. During this time, we have played our game in editor thousands of times. We have a UMG start menu that pops up initially and the general string of actions is as follows:

  1. Start menu comes up (mouse cursor is on the screen and controlling correctly)
  2. Player clicks on a start menu option (“Start Game”) and the Start Menu goes away and they are now in game
  3. The editor prompts in the upper left corner “Click for Mouse control”
  4. Player clicks the viewport play screen and then they have mouse control in game and the cursor is removed (we have a first person game so the mouse now controls the camera)
  5. The editor prompts in the upper left corner “Shift+F1 for Mouse Cursor”

All that is well and good. Last night, me and another team member noticed some very odd behavior. It is as follows:

  1. Start menu comes up (mouse cursor is on the screen and controlling correctly)
  2. Player clicks on a start menu option (“Start Game”) and the Start Menu goes away and they are now in game
  3. The editor no longer prompts in the upper left corner “Click for Mouse control”
  4. Clicking on the viewport does nothing and the mouse cursor never goes away. The in game camera can not be controlled as usual, yet clicking and dragging the mouse in the viewport moves the in game camera.
  5. Pressing Shift+F1 doesn’t seem to change the behavior of the mouse at all.

We are seeing this problem on 4.7.5 and 4.7.6 and on different machines. I doubled checked the editor settings for mouse control while playing and ensured that everything was set to defaults. We are also seeing this while playing in viewport or standalone game. This suggests that it is something we are doing rather than a weird editor issue.

We suspect this is some UMG thing (either from our start menu or from our HUD which is also UMG) not relinquishing mouse control in the same way as it was before. The HUD (which should appear right after the start menu is closed) seems to be the most likely offender right now. Does anyone know what might be causing this behavior?

Thanks in advance!

Hi NullifiedFox,

I’ve never heard of an issue where the mouse controls would react in this way. I see that you’ve been working on this project for a while so I’m not sure how large it is but can you send the project itself to me? It would make it much easier to pinpoint the issue since it isn’t something I can easily reproduce myself. If you cannot get the file size down below the 10MB limit for Answerhub, please feel free to use external hosting sites such as Dropbox.

I hope I can swiftly find the cause of the issue for you.

Hey ,

Our project is pretty big (and likely a completely inefficient use of that space), so sending it might be an issue. In a couple hours, one of our team members is going to take a look at some of the things he changed last night and try to fix (or at least reveal) the issue. If there is any other info I can get you that would help you recreate the problem, let me know.

EDIT: I’m not in front of my project right now, but I will be later tonight. If we have not made any progress then, maybe I will try to up the project and get it to you.

I’m wracking my brain and the only thing I can think of that could be remotely related would be that the boolean variable ‘bShowMouseCursor’ which is part of PlayerController may be edited somewhere. Otherwise I can’t think of anything off the top of my head that’d affect it in such a way.

We are using a modified version of the default FPS Template project. I thought I checked the status of that flag last night but only in editor. I didn’t verify that our code isn’t touching that boolean in some strange way. I know we changed a couple things in our player character’s event graph as well as some UMG stuff. I don’t know if any of that helps.

An update…

As it turns out, our start menu event graph was bypassing the unsetting of “Set Show Mouse Cursor” (which is, of course, bShowMouseCursor under the hood). Your instincts were right on the money . Thanks so much for even devoting any time to this strangeness. I’m glad it wasn’t some weird or unexpected behavior.

Thanks!

I’m happy to be of help. That was honestly a shot in the dark. Glad to see your issue was resolved.