Linux - mouse locking and viewport

We’re working on an RTS style game where the user can pan the camera by moving the mouse cursor to the edge of the screen (similar to many other RTSs). This works great in Windows, but when packaged for Linux the following issues arise:

  1. “Lock Mouse to Viewport” on the blueprint node “Set Input Mode Game and UI” does nothing for Linux.
  2. In full-screen mode, “Get Mouse Position” returns false when the cursor is at the left-most and top-most extents of the screen.

To test this, I made a Blueprint project based on the Puzzle game template. The only change I then made was in the Level Blueprint which looked like the following:

Firstly, this should lock the cursor to the Viewport on every tick - on Windows that’s what happens, but on Linux, the cursor is totally free. Then the “Get Mouse Position” should return (1) a bool to determine if the mouse is over the Viewport and (2) the coordinates of the mouse cursor in the Viewport. Here, both perform similarly, but under Linux he node returns false when the mouse is against the top or left extents of the full-screen Viewport (i.e. where Location X == 0 || Location Y == 0).

I tested this behaviour on the following Linux distributions:

  • Mint 17.3
  • SteamOS 2.7
  • Ubuntu 14.04
  • Ubuntu 16.04

Good luck fixing this.

Hey -

Thank you for your report. The fullscreen issue (UE-27679) as well as the mouse locking to the viewport (UE-25615) are both known issues that are currently under investigation by developers. There is no timeline at the moment for when these fixes will be included into the engine.

Cheers