Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Win 7 64, 4.5.1

Here's my node setup: alt text

I've narrowed it down to the 'show mouse cursor' bool causing the issue.


  1. Switch to mouse control (in my case by hitting "I")

  2. Click anywhere in the game window

  3. Switch back to freelook by hitting "I" again

  4. PIE window loses focus

Product Version: Not Selected
bug.jpg (103.2 kB)
more ▼

asked Nov 15 '14 at 04:30 PM in Bug Reports

avatar image

1.2k 57 67 99

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello Hyperloop,

Thank you for your information and time. I was able to reproduce this issue. I have sent a report (UE-5534) to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. I also have a workaround that may work for you. The following example was done in my character. I hope this helps

alt text

Make it a great day

focushelp.png (175.4 kB)
more ▼

answered Nov 17 '14 at 06:40 PM

avatar image

Rudy Q ♦♦ STAFF
47.3k 545 132 525

avatar image DanielRW Feb 13 '15 at 01:44 PM

Hello, has this bug been fixed by now? Thanks!

avatar image Rudy Q ♦♦ STAFF Feb 13 '15 at 02:29 PM

Hello Daniel W,

I went ahead and double checked for you. There have not been any updates on this issue.

avatar image Nameless Voice Mar 03 '15 at 01:38 AM

Just came across this issue in 4.7.

I'm quite sure this didn't used to happen back in 4.2.

avatar image Rudy Q ♦♦ STAFF Mar 03 '15 at 01:41 PM

Hello Nameless Voice,

There have been no updates to this issue containing any pertinent information, however the workaround listed above could prove viable. I hope this helps.

Make it a great day

avatar image Nameless Voice Mar 05 '15 at 01:42 AM

My issue is slightly different. I have the mouse cursor being activated when I hold down the right mouse button, and being hidden again when I let go. When I let go, the game window loses focus, and I have to click on it to regain mouselook.

If I use a key instead of a mouse button for this action, it works as expected.

I've worked around the problem by drawing the mouse cursor manually as part of the HUD, which also has the added advantage of allowing custom cursor art. The movement is not as smooth as a real cursor, though.

avatar image Rudy Q ♦♦ STAFF Mar 05 '15 at 12:44 PM

Hello Nameless Voice,

I believe I may have a solution to your issue with losing focus on the game screen. If I understood you correctly. You want to show mouse only while holding down the right mouse button and you would like the screen to follow the mouse at all times. I hope that this helps.

The input nodes can really help when it comes to setting the focus where you want it.

alt text

Make it a great day

gamefocushelp.png (87.3 kB)
avatar image Nameless Voice Mar 05 '15 at 08:52 PM

Set Input Mode Game Only fixes it, thanks!

avatar image MrCorzell Jul 21 '16 at 01:05 AM

Thanks! That worked perfectly for fixing this issue.

avatar image Hyperloop May 03 '15 at 12:17 AM

Are there any updates on this? I'm also unclear as to why the workaround works - why would it matter how we are setting the "show mouse cursor" bool?

avatar image Rudy Q ♦♦ STAFF May 04 '15 at 02:04 PM

Hello Hyperloop,

If you are referring to the example given to Nameless Voice then setting the mouse does not necessarily matter. The example given was specific to what Nameless Voice was trying to achieve. Setting the Input mode Game Only will allow you to give focus to the mouse. I hope this information helps.

Make it a great day

avatar image Mach45 Mar 30 '15 at 02:52 PM

Hi, thanks Rudy, the above works as a work-around for me too..

avatar image illYay Apr 15 '15 at 06:35 AM

Can you explain what the workaround is?

I'm actually toggling showing of mouse cursor on the player controller in C++ code when my guy hits the toggle show inventory key.

And this happens in Standalone for me under 4.7.

avatar image Mach45 Apr 15 '15 at 08:15 AM

Hi IllYay,

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..!

alt text

lookwithnormb.png (185.4 kB)
avatar image RimmyD May 13 '15 at 10:05 PM

Sadly none of these solutions work without clicking the mouse cursor again. If you have a setup such as "Press E to show the mouse" it will always require a click with anything posted here.

avatar image Hyperloop May 13 '15 at 10:20 PM

Yeah, this is a major bug if you want to ship a professional looking game. I'm not sure why it's still an issue after 5 months :/

avatar image Rudy Q ♦♦ STAFF May 14 '15 at 12:50 PM

Hello Hyperloop,

I went a head and double checked on this issue for you and it appears that this issue has been resolved internally and will be available in a later release of the engine. I hope this information helps.

Make it a great day

avatar image Hyperloop Jul 06 '15 at 09:37 PM

Can we get an update on this for 4.8 please? As stated above, this is the kind of bug that prevents shipping a finished product.

avatar image Rudy Q ♦♦ STAFF Jul 07 '15 at 02:45 PM

Hello Hyperloop,

I have tested this issue in the 4.8.1 version of the engine and I have updated the report. I have also found that the workaround (setting the input mode to game only) still works. The reason that this is the case is because when the input is set to UI only when the user clicks the screen while the mouse is showing. So when the mouse is hidden again the input mode is still on UI only. This is why setting the input mode to game only when the mouse is hidden alleviates the issue. I hope that this information helps.

Make it a great day

avatar image devilhiyan Jul 05 '15 at 04:21 PM

This issue is still there in 4.8.1 though workaround of setting input mode work

avatar image nonder Aug 24 '15 at 05:49 PM

I have very similar issue, I need to use hardware cursor because my game is RTS and software cursor is too laggy. So I enabled "show mouse cursor" and these are my issues:

  1. Game windows has focus only when I click, immediately on release game windows lost focus. This means I can use free look only when holding button.

  2. Cursor is not locked in game viewport. It can go out of game windows easily and that is not good for me because I need to pan map when cursor is near edge of window.

Set Input Mode node seems to do nothing. Tried all nodes and all settings.

Btw. Feature request: It would be good to give better options and change variable naming. I belive it should not be named "show mouse cursor", maybe it should be something like "enable hardware cursor"

avatar image Rudy Q ♦♦ STAFF Aug 24 '15 at 06:17 PM

Hello nonder,

Have you tried using the Set input nodes (Set input UI only, Set Input Game Only, Set Input UI and Game)? These nodes will allow you to lock the mouse to the screen as well as manage the focus on the viewport.

avatar image nonder Aug 24 '15 at 08:49 PM

Hely, thank you for quick answer Rudy :) I found the reason why Set Input nodes do nothing for me. Using them on Begin Play is probably too soon, I added delay and now I can see effect.

However, there is another issue. Everything is great until I click mouse button (It does not matter which one). After clicking mouse button, cursor is not locked anymore and I can leave window.

I tried workaround that I called Set Input after Left Mouse Button Pressed but It have not worked. I found even more ugly workaround but this one works: settings Set Input Game Only in tick.

Do you have any idea why viewport lock is reseted after mouse click ?

avatar image Rudy Q ♦♦ STAFF Aug 25 '15 at 01:30 PM

Hello nonder,

This issue about the mouse not locking to the screen properly is a known issue (UE-7293), I will be sure to bump up the community interest for this issue. I am happy to hear that you have a workaround. Thank you for your information and time.

Make it a great day

avatar image Hyperloop Aug 28 '15 at 07:30 PM

Thank you for the reply. Just wanted to chime in and say that I'm very interested in getting this fixed as well, especially since it's been hanging around for 10 months or so. I haven't been able to use the workaround reliably for whatever reason, and this is the kind of issue that could delay shipping our game if we can't find a way to resolve it.

avatar image Rudy Q ♦♦ STAFF Aug 31 '15 at 03:49 PM

Hello Hyperloop,

I understand you interest in this issue. I will be sure to update the community interest numbers to reflect the interest for this issue. Thank you for your time and information.

Make it a great day

avatar image Frozenfire Oct 15 '15 at 04:33 PM

Hello. I've been getting symptoms of this problem still. I'm wondering has this been fixed , I'm asking since this is a problem already reported a year ago. If this has been fixed , perhaps my isuse is different.

The workaround doesn't seems to work on my case. I'm using a combination of C++ / Blueprint in a game mode where it's possible to switch between FPS and RTS. For my specific case , after switching to RTS view , the first click on the ground would cause the game window to lose focus. But switching back to FPS (hide mouse ) and clicking once would lock the window back.

avatar image Rudy Q ♦♦ STAFF Oct 15 '15 at 05:44 PM

Hello Frozenfire,

This issue has been resolved. Could you start a new thread with answers to the following questions?

Quick questions:

  1. Can you reproduce this issue in a clean project?

  2. If so, could you provide a detailed set of steps to reproduce this issue on our end?

  3. Could you provide screen shots of any blueprints that may be involved with this issue?

  4. What version of the engine are you using?

Answer the questions in a new thread and then provide a link to the new thread in a reply and I will be happy to assist you further with this issue.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question