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. 

UE-28811 & UE-29148 Unresolved in 4.11.2

Fixed! UE-28811 Get mouse X/ Get mouse Y returns zero after the user clicks the screen and mouse is shown Fixed! UE-29148 Using "Show Mouse Cursor" breaks mouse axis movement

These appear to still be broken.
There is no method using blueprints to access Mouse X/Y values that work under the following conditions (4.11 project and 4.11.2 empty project):

1) Mouse Cursor is set to shown on PlayerController
2) Any Mouse Button has been released once already (mouse wheel x/y N/A)
3) No mouse button is currently in pressed state (mouse 4/5+ included)

The following all return 0 under the above conditions on both PlayerController (consume input disabled) and a possesed spectator pawn (input enabled):

-Custom Mouse Axis Bind
-GetMouseX/Y Function Call
-MouseX/Y Axis Events
-MouseX/Y GetAxisValue Call

My testing has shown this bug to be centered around the Project Settings -> Input variable named "Default Viewport Mouse Capture Mode". The two capture Permanently options are providing the wrong capture. Capture during MouseDown and RightMouseDown is working as intended. However all modes process mouse input until first mouse up event. During this time, the cursor is bound to the game window.

In addition, setting "Consume Input" to false on mouse axis events does not work correctly, the event will fire on a controlled pawn but the value of the axis will be 0 (in addition to the above issue).

Further testing shows:

-Setting InputModeGameOnly will reset Mouse values to a state similar to first run (ie. before first MouseUp event) -Setting InputMode to either UI enabled option acts like the MouseUp event does in terms of causing a mouse 0 state, and was also extremely buggy in my test case.

As a related issue. 4.10 projects converted to 4.11 show inconsistent mouse behaviour seperate to this issue. (Notably relating to double clicks). This appears to be routed in the same ViewportCaptureMode from above, as this was added to 4.11 as a new feature as part of the HUD class rework (to my understanding).

I have a Test4.11Project if anyone wants to verify to see if there is an error somewhere.

Product Version: UE 4.11
more ▼

asked Apr 25 '16 at 12:24 AM in Bug Reports

avatar image

26 1 4 6

avatar image VSZ Apr 25 '16 at 07:12 PM

+1, I'm still seeing mouse capture issues in 4.11.2 too. Thanks to Nodrak for the detailed writeup.

My game switches between InputModeGameAndUI (strategic mode) and InputModeGameOnly (third-person mode) by player input. Unless I hide my mouse cursor for the strategic mode (not what I want) then any mouse action that requires delta mouse coordinates (drag-to-pan/drag-to-rotate-view/etc) doesn't work.

Hopefully there's a third hotfix lined up, this is a pretty serious issue for games with strategy style controls. Also if anyone knows any workaround (code or BP) that'd be great to know!

avatar image MugenCity Apr 26 '16 at 02:28 AM
  • Same problem on our team's project.

InputAxis tied to mouse X/Y return a 0 axis value unless the mouse cursor is hidden.

  • The mouse locks to the viewport when Show Mouse Cursor is set to false then back to true. 'Set Input Mode Game and UI' must be called after showing the cursor to fix this.

  • Setting Show Mouse Cursor to true after being false requires a click before mouse clicks register if 'Set Input Mode Game and UI' is not called.

  • The mouse does not redraw when Show Mouse Cursor is set till true until the mouse is moved.

Here is an example of how I have worked around the 0 Axis Value issue, but have to hide the cursor and recall set input mode. The cursor does not show up again until the mouse is moved. alt text

workaround.png (163.5 kB)
avatar image Arthur Khusnutdinov Apr 26 '16 at 01:20 PM

+1, same problem

avatar image c.greb Apr 26 '16 at 02:35 PM

Same problem here with 4.11.2

avatar image VSZ May 10 '16 at 09:23 PM

I found a workaround today - passing "HideCursorDuringCapture" as "false" to SetInputModeGameAndUI fixes my capture issues.

However, this was tested with only my simple usecase of switching between GameModeAndUI (with mouse shown) and GameModeOnly (no mouse) so it may or may not work for more complex usecases (like the scenarios Nodrak listed).

Still thought I'd post it in case it helps someone.

avatar image Nodrak May 10 '16 at 11:48 PM

You have to call either SetInputGame or SetInputGameandUI after any MouseUpEvent for it to work consistently.

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

1 answer: sort voted first

Hello Nodrak,

I have tested this issue again using 4.11.2 and it appears that you are correct. I have updated the report (UE-28811) and I have submitted this information for further consideration. I will provide updates with any pertinent information as it becomes available. As for the issue UE-29148, I ran through the test case for this issue and while the issues are similar it appears to be resolved. Thank you for your time and information.

Make it a great day

more ▼

answered Apr 27 '16 at 03:49 PM

avatar image

Rudy Q ♦♦ STAFF
47.4k 545 132 523

avatar image Firat May 31 '16 at 07:45 PM

Can we get an update on this? It's been almost 6 months since the issue first appeared.

avatar image Rudy Q ♦♦ STAFF May 31 '16 at 07:57 PM

Hello Firat,

The issue UE-28811 as mentioned above was updated and the status has not been updated to fixed as of yet. I will be sure to bump up the community interest on the report for this issue. However, as for the issue UE-29148, I ran through the test case for this issue and while the issues are similar it appears to be resolved. I hope that this information helps.

Make it a great day

(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