Circular Position Offset

I’m creating a skilltree system, and I’m drawing lines between my child and parent nodes.

Currently, I’m just drawing the line from position to position, but because my nodes have some transparency, you can see the line in behind, and it looks like garbage:

95564-capture.png

Instead, I want my line to draw from circle edge to circle edge. I know I want to offset the start/end positions of my line by the radius of my nodes, but how do I determine the correct x/y offset amounts based on the angle of the line?

Simply do this:

Vector3 p1;
Vector3 p2;
Vector3 dir = (p2 - p1).normalized;
Vector3 start = p1 + dir * radius;
Vector3 end = p2 - dir * radius;

Here p1 and p2 are your node positions and radius is your node size.