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.

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.

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.

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

Hello, I have same issue.
Do you find a solution?