Seems like drag’n’drop operation consumes mouse events. Is there an accessible event outside widgets so I could detect mouse release or drop on actor itself and could fix my current redneck solution?
Extend the drag&drop operation - it has 3 overridable functions - Drop / Drag / Cancel - all returning pointer data. You can then line trace for world objects while dragging.
The Player Controller does not know what is happening to the cursor during the drag, the operation does. Details in my post here.
It’s not, no widget to drop on = no call. You can evoke drop cancelled, though. I’m actually unsure what is the purpose of Drop in the DragOperation.
The Dragged is super-useful for what you need - getting cursor position and checking what’s underneath; deproject screen to world and trace.
I can’t remember precisely, but you will most likely need to provide the drag & drop operation a reference to the player controller as these two normally can’t see one another. This screenspace / world space interaction is not something UMG was designed for, it seems
There is another hackaround (apart from your crafty (!) 2 frame delay in order to read cursor data from the controller).
You can cover the entire screen with a visible canvas during drag - that canvas will know what is being dragged over it and where it’s heading:
As you can see, it’s possible to drive both a widget and a world object during the same tick like this. It’s hacky but it does work. From here you can treat that cube as a collider and have it interact with the world.
Anyway, coming back to the non-hacky solution, here’s a quick wrap up that actually does not require you to send player controller reference anywhere but uses a dynamic dispatcher bind instead:
The Custom Drag and Drop Operation firing a dispatcher with 2d vector:
Hmm so far it’s seems that my solution wasn’t so bad
Anyways thanks for the interesting example! I’ll mark your answer as appropriate, since Dragged is technically what I asked for.