x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Bug: Mouse Clicks not responding after set Input UI, then to Game

In 4.10 I didn't have any missed mouse clicks. In 4.11 I did, I would have to click 10 or 11 times to get it to register once.

In my main menu map, as the UMG is loaded I was setting the controller to InputMode UI only. When the map was launched I set the InputMode to Game Only.

The result was, keyboard would work, but mouse clicks not registering.

Removing both nodes fixed the problem, but I would have prefered there to be no game input when there was a full screen UMG widget.

This is a bug. I already have a fix, by not using the nodes. It might cause someone else a headache if they run into it so I'm reporting it.

Product Version: UE 4.11
Tags:
more ▼

asked Apr 22 '16 at 02:18 AM in Bug Reports

avatar image

mikepurvis
2.5k 102 66 261

avatar image Adam Davis STAFF Apr 22 '16 at 06:11 PM

Hi mikepurvis,

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?

  • What steps can I take to reproduce this error on my end?

  • Do you have any other assets or blueprints that may be consuming the mouse input?

avatar image mikepurvis Apr 22 '16 at 08:15 PM

I only tried this in the specific project.

To reproduce: In Input file add a MouseClicked event. In controller, put a print statement off the event. Test that each time you click, it prints. open a UMG Widget and set InputMode to UI Only. Close the Widget, (from the widget) and set the InputMode to Game Only.

Now test clicking the mouse button. Only about 1 in 10 will respond and print.

I don't believe anything else is consuming them. Because, if I unhook all the SetInput nodes, it works fine.

avatar image mikepurvis Apr 24 '16 at 08:24 PM

This got stranger. I found some notes from Rama on the forums.

Apparently, calling Set Input Mode UI, or Game and UI or Game no longer works except if you call it from inside the PlayerController. Even setting the reference to the PlayerController does not work correctly if from the UMG.

Setting an Event on the PlayerController, and have the UMG call the Event and pass itself to the PlayerController at the end of consrtuct seemed to fix the problem of having focus, and can again get Gamepad events in the UMG.

Edit: The events are not in the OnKeyDown, they are getting handled under the hood somewhere, with DPad changing highlighing on the buttons. It has now hyjacked handling Controller input.

The Controller bottom face button now simulates a mouse click.

But, the Hover, UnHover shows a dotted line around the bounding box of the Buttons instead of switching to the images to Hovered and back to normal.

4.11 really messed up the UMG with focus. Especially since it didn't support Gamepad and the mouse enter and leave functions were private, many people will have their own solution to Simulate Button Hovers and Clicks so the GamePad can navigate.

avatar image Betazero Dec 13 '16 at 01:33 PM

I was experiencing the same problem. I start my game and everything is fine. I open the options menu UMG and it works fine. I click on the return to the game and my mouse will click about once every 20 attempts and always the 1st click works. Thankfully the removing the target on the set 'input mode game only' has done the trick. Thanks TSAROTH :)

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

8 answers: sort voted first

Hi mikepurvis,

There are several known issues with set input UI. The one I think is applying in this case is UE-14476. Switching set input to either UI/Game/Game and UI consumes all controller input, which could cause errors such as the one you are seeing. I am going to update this bug report to reflect that additional developers are experiencing it.

more ▼

answered Apr 26 '16 at 06:19 PM

avatar image mikepurvis Apr 27 '16 at 07:38 PM

Thanks,

I thought I had it sorted out, by setting it through an event on the PlayerController as I saw in Rama's post but, I'm left with one unresolved issue.

My game is either in GameController mode, or Keyboard and mouse, which is set on game launching as a variable in the GameState class.

If I don't use those input sets, I can't use the UMG menu's with the Controller, but if I do, the mouse clicks are messed up.

Also, the way UMG and the Controller is working has changed, and not for the good. In 4.10 I processed the OnKeyDown event on the UMG and then tested the key for type and called functions explicitly which navigated my buttons. I extended the UMG Button to call the hover event to do this.

Now, the OnKeyDown is not getting called for the D-Pad, the input is being captured under the hood in Slate somewhere. There is now some automatic button navigation with the D-Pad, but it is not calling the hover events correctly, it creates a dotted line box around the button's image. The bottom face button now simulates a mouse click on the button as well. I didn't see this stuff in the upgrade notes, and it is not working correctly. Because it is hijacking the input at a low level it's difficult to work with from a launcher version of the engine.

avatar image Adam Davis STAFF Apr 28 '16 at 05:22 PM

This is another known issue and is in our system as UE-28825.

avatar image mikepurvis May 18 '16 at 02:58 PM

It's been 3 weeks, has this bug been addressed? In 4.12 it is still broken, only about 1 out of 10 mouse clicks is registered. Shooting works good with controller but sucks with mouse, basically unplayable as a pc game with mouse and keyboard.

avatar image Adam Davis STAFF May 18 '16 at 04:54 PM

HI mikepurvis,

This error is still under assessment by the development staff. Unfortunately I do not have a timeframe of when it will be addressed.

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

Hi Harth Tuwist,

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here. You can track the report's status as the issue is reviewed by our development staff.

more ▼

answered Oct 03 '16 at 08:19 PM

avatar image Agreyz Jul 02 '17 at 12:45 AM

Hi,

I look at the bug report and it says this bug has been resolved, but I am having the same issue in 4.16 right now. What I have is a MainMenu level with a widget menu and player controller for that level with input mode set to ui only. I load my main level which is from the top-down template with OpenLevel node. Inside the OnBeginPlay event on my player controller for the main level I set input mode to game only and I need to double click to move my character. Interesting thing is that if I set the input mode to game and ui it works with single clicks. Just wanted to let you know the bug is still there.

avatar image norlin Jul 29 '17 at 07:11 PM

Have you found any solution for this issue? I've also faced with it in 4.16.2

avatar image Rudy Q ♦♦ STAFF Aug 04 '17 at 05:41 PM

Hello norlin,

I ran through the steps in the issue reported above and was able to reproduce this issue in 4.17. I have reopened this issue. Feel free to use the link below for future updates.

Link: https://issues.unrealengine.com/issue/UE-36760

Make it a great day

avatar image ZTD09 Aug 14 '18 at 11:11 PM

Is there any update to the status on this? I can still reproduce this in 4.20 and it's a real pain in the rear of my project in 4.19 .

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

I found a solution. Disable the "Show Mouse Cursor" in the Controller and everthing works perfect. But if you have no other cursor and need someone you must create your own.

more ▼

answered Feb 24 '17 at 08:28 PM

avatar image

Pypatron
6 4 8

avatar image Exonfluxx Feb 26 '17 at 04:09 AM

This Worked for me for now. My Game I will need to show cursor Hoping it gets fixed soon.

avatar image Pypatron Feb 26 '17 at 07:49 AM

This node never helped me. There was 2 options that delete the bug: ----Project Setting -> Input -> Viewport Property -> Default Viewport Mouse Capture Mode -> "CapturePermanently_IncludingInitialMouseDown"

or

---- in the Player Controller -> Mouse Interface -> set "Show Mouse Cursor" false

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

I just had the same issue in 4.12 and I seem to have fixed it by not hooking anything up to the target pin on the Set Input Mode Game Only node inside the player controller BP

more ▼

answered Jun 15 '16 at 09:33 PM

avatar image

tsaroth
1 1

avatar image Betazero Dec 13 '16 at 01:33 PM

Thanks this worked for me :)

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

I am also experiencing this bug in 4.13. I haven't checked 4.13.1 yet, but there is nothing in the patchnotes that seems to fix that problem. Google tells me that UE-14476, but it seems to me that this is not the bug OP was talking about. After switching to InputMode GameOnly, my game takes mouse down events only when I double click (resulting in the behavior described above if you are not aware of the situation and just randomly click in your window).

I have a main menu, where I set Input Mode UI only, and on PostLogin in the actual game I change the InputMode to GameOnly (I am copying MP behavior from the Shootout example). If i use tsaroths suggestion, the nodes do not seem to do anything at all.

I also tried a custom node with C++ Code [PlayerController]->SetInputMode(FInputModeGameOnly());, but that didn't work either.

Are there workarounds? Besides not using these nodes at all?

more ▼

answered Oct 03 '16 at 01:13 PM

avatar image

Harth Tuwist
1 1 5

avatar image Adam Davis STAFF Oct 03 '16 at 01:57 PM

Hi Harth Tuwist,

UE-14476 was closed as 'Cannot Reproduce'. Do you have any specific steps I can take to recreate this on my end?

avatar image Harth Tuwist Oct 03 '16 at 06:37 PM

I reproduced this on a new project: 1. Take the top down example 2. Add a keyboard bind and let it run the code "Get player controller (0) -> Set Input Mode Game Only" in the level Blueprint (but anywhere else it is the same problem) 3. Build an actor that changes the Material when the "OnClick" event is run

When you run it: -Just clicking on the actor: A single click changes the material -Clicking on the actor after Input Mode Game Only was set: you need to double click on the actor to make it change Material (the first time after the input it actually works with a casual click, but after that you need a double click).

Edit: Sorry for formatting

avatar image Pypatron Feb 21 '17 at 10:39 PM

In the same example I only need to the node "Input Mode Game Only" with a "Get player controller" and I have this bug. This kill my actually project, but I havent any "Input Mode Game Only"nodes in my Project. I am not shure whats the problem, but need a resolve

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

My Game is using 4.15 and this was a bug that I thought was an issue with my logic as my project relies heavily on mouse inputs and mouse click Combinations. I Ripped apart most of my logic to figure out where I messed up and after I stopped second guessing myself I decided to do a search and found this post. That will teach me lol. Once I realized it was a bug with UE4 thanks to this post I set to find a workaround. I think it was already mentioned here but I found out that just removing the Input mode nodes on my project the bug stopped and the lack of the nodes had no effect on my projects performance at all.

Attached A Screenshot for those who need a visual for this solution.

Image Of A blueprint

inputmode.png (274.7 kB)
more ▼

answered Feb 26 '17 at 05:07 AM

avatar image

Exonfluxx
379 1 5 8

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

I'm also facing this issue in 4.18.1, after a few diging, I've found a quick solution. In PlayerController.h

 /** Data structure used to setup an input mode that allows only the player input / player controller to respond to user input. */
 struct ENGINE_API FInputModeGameOnly : public FInputModeDataBase
 {
     /** Whether the mouse down that causes capture should be consumed, and not passed to player input processing */
     FInputModeGameOnly& SetConsumeCaptureMouseDown(bool InConsumeCaptureMouseDown) { bConsumeCaptureMouseDown = InConsumeCaptureMouseDown; return *this; }
 
     FInputModeGameOnly()
         : bConsumeCaptureMouseDown(false)
     {}
 
 protected:
     bool bConsumeCaptureMouseDown;
 
     virtual void ApplyInputMode(FReply& SlateOperations, class UGameViewportClient& GameViewportClient) const override;
 };

I've changed

 FInputModeGameOnly()
          : bConsumeCaptureMouseDown(true)
      {}

to

  FInputModeGameOnly()
          : bConsumeCaptureMouseDown(false)
      {}

This might be a dirty patch but for me it does the trick

more ▼

answered Jan 29 '18 at 09:58 AM

avatar image

benjaml
26 5 5 8

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

I am facing the same problem in a top-down shooter I am making, with the "Set input mode game only" enabled, I have to click multiple times for the character to shoot once, and this is in 4.21.2.

more ▼

answered Feb 03 '19 at 09:37 AM

avatar image

megaxiphias
6 2 4 6

avatar image Flemmard Mar 13 '19 at 04:48 PM

Same in 4.21.2. Still trying to figure out a workaround ..

avatar image Flemmard Mar 13 '19 at 05:02 PM

Looks even worse than that, seems like GetYaw/GetPitch stops being affected too .. wth :D

avatar image Flemmard Mar 13 '19 at 05:14 PM

And it's still present in 4.22

(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