Switching "show mouse cursor" from on to off loses focus in PIE window

Hi ,

2 issues:

  1. If you want to look around with the camera using mouse XY movement, when “show mouse cursor” is set, the RMB needs to be held down (otherwise mouseXY input axis events only ever output 0 value for the mouse movement).
  2. When changing “show mouse cursor” to set/unset, the mouse looses focus in the game/player editor (PIE) window, meaning you have to click in the window for the mouse to regain focus and have in-game control (not a clean finish for the end user).

Fixes:

  1. Use the “set show mouse cursor” node in your player controller blueprint to dynamically set and unset it (e.g. unset it when you enter your “free-look” mode, then set it again when you exit free-look and have your mouse cursor back again).
  2. Then use the “Set input mode game only” node when you enter your free-look mode (to refocus the mouse to be in game without needing the extra mouse click). Then use the “Set Input Mode Game and UI” when exiting free-look mode to refocus to both in-game window and HUD widgets.

Below is the example in my player controller… hope it helps…!