UMG - Drag-and-Drop visual spawns at an incorrect location after setting the widgets transform

Hey guys!

I have a question regarding Drag and Drop within UMG.

I have setup a procedurally generated widget system which sets transforms which the user is able to drag and drop on screen. Everything seems to be working great, however there does seem to be one little issue I seem to be seeing regarding the drag visuals initial location.

When the user drags the image, the drag visual is created but spawns at a different location then the widget being dragged. This is only the initial location as it then flies to the correct position of the drag operation. For example, the user drags an image from the center of the screen, but the drag visual flies from the left of the screen to the drag location.

A stripped down version of my setup below. (Have tried with and without setting the anchor based on the location of the widget after it has been set)

After a bit of digging the location it spawns does change when edits have been made to the Anchor and the layout has been set. So my assumption would be that the drag visual is spawning at the correct location for the Anchor points, however the widget location I am setting previous to this is not used to create the visual.

I have read that the canvas panel is not great when it comes to procedurally generating content, however I am unable to find another suitable option that supports multiple children and the ability to set its transform (procedurally).

I was wondering if there is a possible alternative or workaround for something like this? or if there is any other tips and tricks when it comes to procedural content and anchors?

Much appreciated! :slight_smile: