UMG Mouse Move with mouse button down: how to release mouse in the end

Hi, I’m detecting mouse down and move event for my widget to rotate character. I’ve come this far:

by overriding On Mouse Move, always returning capture mouse event, and overriding Mouse Up to release mouse. However, it doesn’t seem mouse is really released, if Mouse Up is triggered when cursor is still on widget, it won’t hover on outside buttons (return to normal state), mouse only returns to normal state when I release LMB when cursor is far outside or when I click outside of the widget after releasing LMB.

How do I clear mouse capture after mouse button is released so it would hover buttons in outside widgets without another click or anything else?

My error:

This part is triggered after mouse button up event, so it has to contain release mouse capture.

To save rotating, I overriden On Mouse Button Down event to return handled capture mouse event, so

  1. On Down start capture
  2. On Move either capture or not capture, depending on mouse is down or not
  3. On UP, release capture

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.