Vector math intersection (need help)

Hey, so i am making a 2d game, now i’m in a math problem

Say there are two points on a graph, (x1, y1) & (x2, y2), the second point has a circle around it with radius “r”
now if we draw line between them, what would be the formula to find where it intersect the circle.

oh hold on, its far simpler.

point a + ((point b - point a).normalise * r)

i.e

point a + r in direction of b

2 Likes

Alright, thank you, this did not exactly solved it, but it helped a lot
i used it like this

c.position = b.position - (b.position - a.position).normalized * r;