Tag Info

New answers tagged

0

You only have to find the intersection point in your LineIntersectsLine method. Add something like this last: Vector2 t0 = l1p2 - l1p1; Vector2 t1 = l2p2 - l2p1; Vector2 t2 = l2p1 - l1p1; float dotDPerp = t0.X * t1.Y - t0.Y * d.X; float t = (t2.X * t1.Y - t2.Y * t1.X) / dotDPerp; Vector2 intersection = l1p1 + t * t0;



Top 50 recent answers are included