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"

How to disable default mouse look bindings?

I have a project where I want to have a cursor visible, and be able to interact with the UI and the game. Whenever I press and hold any mouse button, the mouse is captured and the camera looks around. How do I disable this?

From answers to similar questions, I have already tried to:

  • Set Project Settings --> Default Viewport Mouse Capture/Lock Mode to No Capture/Lock (and restarted the editor).

  • Called PlayerController --> Set input mode Game and UI, with lock mode set to Do Not Lock.

  • Created events for mouse X and Y in my character blueprint.

  • Some people suggested to uncheck Create default input bindings or something like that, but this option doesn't exist in the Player Controller or Character classes.

But still, when I click and hold with any mouse button while in game, the camera looks around.

Calling PlayerController --> Set Ignore Look Input is not a solution because that causes the Mouse X/Y events to always return 0.0 axis value in the character, and I need those actual values.

Expected result: I'm trying to make it look around when you hold left mouse button, pan when you hold middle mouse button, do nothing on right mouse button.

Product Version: UE 4.19
more ▼

asked Apr 26 '18 at 08:25 PM in Blueprint Scripting

avatar image

1.2k 58 61 253

avatar image Fruti Apr 26 '18 at 08:34 PM

Either add a boolean with a branch where mouse inputs are, so when boolean is true do nothing. Or add an image inside your widget, make it transparent and visible, but behind all other widgets. So your mouse click will only register that a widget was clicked.

avatar image Ixiguis Apr 26 '18 at 08:55 PM

Thanks for your suggestions. The first one is what I already do, but mouse look gets activated even if I don't put anything after the Mouse X/Y events (i.e. just leave the events there with nothing plugged, they supposedly should override any parent binding). The invisible widget is a nice idea, but unfortunately it doesn't works. If instead of image I use an invisible button, then it works, but only for the left mouse button, not middle mouse button.

avatar image Fruti Apr 26 '18 at 08:59 PM

Then replace that image with a border and do this. http://prntscr.com/jakc28 Should work then.

(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