Download

Get Mouse Position While Dragging from UMG

Im trying to get the Mouse Position while dragging an Object from the inventory & starting a Line Trace By Channel from there. I’m able to do this on the “on drop” function, but I’m not able to find out how to get the position of the mouse during the drag operation. It seems like the mouse position isn’t being updated, after the drag operation starts.

Has anyone found any solution to this?

br c.

Mouse position is part of the data passed in the drag / drop operation data.

Thank you for your reply. But I simply can’t figure it out.

This is my “on drag detected” function override. It gives out one position when the drag starts.

4321e3e80e.png

an this is my “on drop” function override. It gives out one position when the drop happens.

ce5376e7c24d8d91cc97225b255a5e15fe00264d.png

So my problem is how to get the mouse position in between this events? When the drag event starts I#m not able to get the mouse position through the player controller. Is there anything simple i’ve been missing?

thank you for your help! c.

The player’s mouse position is not accurate during drag/drop because mouse movement events are not sent, drag movements are sent. You have to use the mouse/cursor position data on the drop operation, not the player controller.