Closed ivanceras closed 5 years ago
Turns out I didn't convert the end point to be a vector. Making the 2nd argument in clip_line function to be a vector from start point to end point will return the correct clip_line instead of just passing the end_point with half ass vector conversion.
I'm trying to get intersection between a line segment and an AABB box, this works for most use-case, but one edge case where the line-segment is collinear with the side of the box, the behavior seems to be inconsistent. The bottom and left side result is OK, while the top and right seems to be wrong.