Spawning an object on "On Drag Cancelled"... spawns in weird locations

I created a drag and drop widget that’s supposed to spawn a 3D object. From some reason it always spawns at around the middle of the scene area, not when the dragged was cancelled. I was trying to play with it but can’t figure it out, any idea what am I doing wrong?

Upper left corner you see the widget, in the center of the screen you see all the spawned cubes

The line trace is not set up correctly. It’s not setup at all, actually.

Can’t recall if that node can fetch mouse position at the time of drag cancel. It’s the Pointer Event that knows the position. So I’d probably use that instead in this case.

How close is this to what you need:

Before you evaluate / attempt to fiddle with the above, try this:

Untested and 99% sure it’s not going to work…

And here’s a simpler alternative if you do not need to drag a widget, just spawn an actor:

1 Like