Closed ebmaxwell closed 3 years ago
Hey there, that’s intended behavior. Most of the time only the first point is needed, so no time is wasted calculating the other. You can perform two ray casts if you really want two points, or use a different library/function to calculate both points.
So by two raycasts I mean flip your ray backwards if you hit the circle to find the exit point
I got it to work nicely using two rays like you suggested. Thanks!
It seems the c2RaytoCircle function only detects collision for the top half of the circle. This is my line and circle:
and I check the point of collision like this:
as you can see from the gif the lower half of the circle colliding with the line isn't detected: