Canvas Slot Draw Line

Hello,

This is probably the single most frustrating issue I have faced during my game development.

I am trying to draw lines between canvas slots (talent nodes, those red round things).

As you can see, the manual white lines are where I want the red dynamic lines to be. The white connections are just placeholders which limit how I can build my talent tree.

How the red lines are currently drawn:

You can ignore the “float +”, I am just trying to understand why the lines are so chaotically placed. The widgets/nodes/red bubble things are anchored to the center of the parent canvas.

TL;DR - How do I make the red lines go where the white lines are, while getting reference to the canvas slot vector references? Do I need to multiply the vectors with something?

Help is appreciated. Thanks.

Since this is unsolved and maybe the answer to @Par0l or someone else, here is what I would do.

I see that you are calling “self” as reference then you are getting the position from the canvas slot and setting Position A on Draw Line. The problem is that “draw line” is not using viewport as reference for coordinates, but the widget that are being painted.

In other words, if you want to draw a line that starts at this widget position and go to a target widget, then draw a line with position A coordinates as “0,0”, and position B should be “Target widget>slot as canvas slot>get position” minus “Self>slot as canvas slot>get position”.