I have a HUD and arrows on all sides of it to move the camera when the player hovers over them. This works just fine. However when I have the mouse clicked, the OnMouseOver event in UMG does not fire. The player need to click and hold on something and in the world and change his view while he is holding it.
Does anyone know how to fire the OnMouseOver event in UMG while the mouse button is being held down? Or something else to the same effect?
Thanks for the reply but I need the OnMouseOver event to fire. The mouse down is working fine when the player is interacting with game objects in the world, but the mouse over event won’t trigger if the either mouse button is being held down.
use the OnBeginCursorOver event of the target to send a message to the firing actor telling it “target acquired” or some such nonsense. And another when OnEndCursorOver (If these events 't work for you, you can simply keep track of cursor position and project the actors position to screen space and do your own logic.
The MouseOverEvent is not being called when I hover the mouse over the up arrow with a mouse button down. I have the nodes from the above post set up in my player controller.
I’ve been able to reproduce this in 4.7 but haven’t been able to find a solution. My guess is the hover check isn’t being done if the mouse is down (but i haven’t looked at the code to verify).
I also tried to get the information about the button and its screen position to perform my own logic in the blueprint with no success. I could very well be missing something. Good news is the check for begin mouse over works on world objects even if the mouse is down. :\
Hey there! I’m at 4.10.2 still facing this problem: Event On Mouse Enter / Leave nor “Is Hovered” aren’t fired while left mouse button is down. NOTE: if I doubleclick and hold left mouse button down all hover events are working just fine :\ Could possible that the problem is some where at Player Controller where I make bindings?
EDIT: Found that most probably it could be related to Drag’n’Drop oepration detected when you hold left mouse and move the cursor. According to Nick Darnell comment no mouse hovering events (including is hovered, on enter / leave etc) are fired during drag operations… Well, my workaround for this is to manually calculate position and size of widget and to check if mouse is within widget’s borders.