Change drag and drop visual

Hi,

I want to change a drag-and-drop visual while I’m dragging a Widget.
I have created a drag and drop operation and set the widget to the default drag visual.
Now I want to hide the default drag visual when my mouse is dragging over an object.
How can I change the default drag visual while dragging the widget?

i am actually having the same question

(i don’t know if i am doing something of legit or not, please be patient with me)

anyone can answer to this ?

The drag operation has access to the visual during drag, get it from there → cast. Other than that you’d need to be more specific.

In my game there is an hotbar where to pick up a cube and place it to a point.
I start the drag&drop operation there. I click with mouse cursor on cube and drag it
to a specific point (there is a separated blueprint that ‘‘at drag cancelled’’ spawn a cube,
but this is another matter)

What i am trying to do is this:

when i click with the mouse cursor on the cube icon in the hotbat it starts the dragging of (another
separated) widget (same shape and size of the cube selected in the hotbar)
I need to make disappear the widget dragged in the viewport only once overing the spot where the real cube mesh will, eventually, spawn.
So, during the drag operation, once the dragged widget is overing the spot where the static mesh
cube could appear , it must disappear

there is a way to make the widget disappear in the moment i reach, with mouse cursor, the spot where will spawn the cube ?
just tell me if there is a way to modify, animate or change visibility to a widget (image, button or whatever it could be) during a draggin operation..

edit now to try to explain better if i can:

i need to make disappear the widget dragged on the spot* while i keep overing the spot without releasing the left mouse button
disappearing while i am overing (with left mouse button still pressed) on the spot and eventually re-appearing if i move away from that spot.
All during a drag operation NOT releasing the left mouse button.

(*i know it normally disappear by its own when i release the left mouse button)

1 Like

Super clear!

  • create a custom Drag Operation
  • override Event Dragged
  • trace here
  • when the trace hits what you want → adjust visual

That would be the cleanest, most natural and by-design method.


Alternatively, when the visual gets created, dispatch its reference to the BP that does the tracing.

1 Like

thanks god (so thanks to you)

solved !

:slight_smile:

1 Like