Hello, I’m testing drag & drop capabilities for my game prototype, I’m quite in advanced stage of development and now I figured out that drag detection isn’t working in UE4. I really don’t want to make my own drag and drop detection using mouse events, also I really don’t want to throw that project away. So what’s the problem?
Although finding some kind of minimalitic information about how to make drag detection withing UMG is quite impossible, I’ve downloaded some project to see how it’s done there - cannot reproduce it. So what do I do?
I create one parent widget which takes whole screen and serves as a container for my draggable widget.
Inside my draggable widget, I add image- to have some kind of “collision box”, so I set it’s visibility to visible. I create overrides for these events: MouserMove, DragDetected. For mouse move, I call DetectDragIfPressed and it’s result send to output. Of course I connect PointerEvent node as I should.
Now when I create override for DragDetected, it get’s never called. Detect drag if pressed is set to drag key - left mouse button. Widget is accepting mouse events as it should since the mouse move event gets fired correctly.
I’m lost, really don’t know what am I missing.