Drag & Drop Operation Dropping Widget to Incorrect Position

Hey there, when you release the drag do you do a set position node to set the final position? If you do, you need to get the offset when you started dragging and subtract that when you do the final position.

My ‘Drag & Drop’ functions as normal, except for this one issue when dropping it back down. As you can see here, the drag pivot is centered on the mouse position. This is precisely what I want it to do.

226139-screenshot-2.png

When dropping, however, it adds the widget at the mouse position, but it snaps to the upper left (0,0) of the widget. This causes it to function very poorly, whereas I need it to place it directly where it is dropped.

226140-screenshot-3.png

And finally, here is a GIF of the issue in action.

226151-ezgifcom-video-to-gif-10.gif

I was pulling the drag offset from my Drag & Drop class, but it turned out that I was pulling the wrong offset.

Were you able to fix it?

Close the question then :slight_smile:

Yep, I was able to fix it after sleeping and rechecking my work the next day more carefully.

For any future viewers, follow your nodes and variable names carefully; use breakpoints as much as possible!

1 Like