PIE Doesn't Completely Capture Mouse Input

Not sure if we’re doing something weird on our end; we just noticed this after the upgrade to 4.11.2:

Steps to reproduce:

  1. Open the editor
  2. Click Play from the main tool bar with the “New Editor Window (PIE)” option selected
  3. Observer the mouse: If you move it around you’ll see your mouse cursor outside the new window (easier if you have a multi-monitor setup) - however, at the same time, if you are bound to FPS controls, you’ll see the camera orientation change, as if it’s capturing mouse input.
  4. If you click outside the PIE window, it loses focus, otherwise if you click in the window, it will gain complete focus and the mouse will disappear

Expected Behavior: Mouse input is completely capture by the new PIE window - you don’t have to click inside of it to gain full mouse capture, and you don’t see your mouse cursor if you move the mouse outside the PIE window.

Hi RiotSamC,

In any of your blueprints/code, are you setting the mouse to lock to the viewport? If it is not set to lock to viewport you will be able to see it outside of the viewport during PIE.

I haven’t been able to reproduce this on my end with a clean, blank project with no additional content, do you have any steps I can take to recreate the error?

We’re not doing anything special in blueprints with the mouse. I tested on an empty project and was able to get it – try selecting the “Run Dedicated Server” option. For me on a clean UE 4.11.2 build that reproduced the bug (my project had starter content, that’s the only difference).

Does this occur when you are just clicking your desktop? Thus far the only time I can reproduce this on my end is when I mouse over another program that can accept/consume the mouse input, forcing focus onto the other program.

It’s just other programs.

In your character blueprint, try adding a “Set Input Mode” (Game, UI, or Game and UI work). When you do so, select “Lock Mouse to Viewport”. Does this cause the error to resolve or are you still able to click on other programs when moving the mouse?