Posted 11 August 2001 - 01:48 AM
I''m not very good at maths but I think that the best solution to my problem is using vector math. I want to make a very good (or perfect) collision detection function which detects if lines/circles are colliding. There would be 3 functions:
BOOL LinesColliding(line1 coordinates, line2 coordinates)
BOOL CirclesColliding(circle1 pos and rad, circle2 pos and rad)
BOOL LineAndCircleColliding(line coordinates, circle pos and rad)
Checking circles together is easy because you just have to check the distance between them. But I don''t know how to do it with lines. Could someone please help?