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"

[Pawn] How to re-enable mouse InputAxis events after first mouse press.

(I'm using 4.12.5) Note: I've seen numerous old topics discussing this topic but none of them were ever solved publicly

My setup is very simple to reproduce

  1. Create (and select in world settings) a game mode that points towards a your own custom player controller class.

  2. Edit that PC class by going to Details->Mouse Interface->Show Mouse Cursor (enable it)

  3. Make a custom pawn that's able to listen to the mouse's InputAxis events (make it the default pawn class). Maybe make it print the mouse's X an Y deltas on the screen so you can easily track the way those events work.

My question revolves around the way the Input axis events run. At first, when you start the game (If you've set up everything properly) the events will run whenever you move the mouse. Once you've clicked the mouse for the first time (doesn't matter which mouse button) all subsequent InputAxis events on your pawn will only fire as long as you keep the mouse pressed.

Many before me have reported that once you disable the "Show Mouse Cursor" setting in the PC class the problem goes away (i found this to be true, regardless of any other settings). But I insist on using that built in mouse "system" because it comes with hundreds of amazing built in features.

My question is the following:

How do I go back to tracking InputAxis events (at runtime) once I've pressed the mouse button for the first time during a gameplay session?

(I welcome both blueprint and c++ based solutions to this issue)

Note: that issue might be happening because the first click "focusing the window". My theory is that once you focus the window those events might change the way the work. In which case my question would go:

How do I allow both the mouse cursor to remain shown and both InputAxis events to run regularly even if the mouse buttons aren't pressed?

Product Version: UE 4.12
Tags:
more ▼

asked Aug 13 '16 at 07:28 PM in Using UE4

avatar image

Balthazzar
6 1 4

avatar image jordylakiere Apr 20 '18 at 06:38 PM

Did you fix this? I have the exact same issue. Updated from 4.16 to 4.19 and now mouse axis doesn't update anymore unless I click.

avatar image KnightSwolaire Nov 09 '18 at 02:56 AM

I am running into the exact same problem right now myself :(

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

0 answers: sort voted first
Be the first one to answer this question
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