Ray collision: wrong end of the collision is detected
skejeton opened this issue · comments
While your solution is a fix, I don't think that's the correct solution. I think we should report both of the collisions.
In a collision between a line and a quad, there will be between 0 and 2 collisions. So the proposed API is that the user will pass a second ic
pointer, which will either be filled with a value (2 collisions), the same as the first ic
(1 collision) or it's value will be undefined (no collisions).
Implementing this is very easy. I think the second point is calculated the same as the first, but using uB
instaed.