How to detect 2D line on line collision?
- by Vish
I'm a flash actionscript game developer who is a bit backward with mathematics, though I find physics both interesting and cool.
For reference this is a similar game to the one I'm making: Untangled flash game
I have made an untangled game almost to full completion of logic. But, when two lines intersect, I need those intersected or 'tangled' lines to show a different color; red.
It would be really kind of you people if you could suggest an algorithm with/without math for detecting line segment collisions.
I'm basically a person who likes to think 'visually' than 'arithmetically' :)
P.S I'm trying to make a function as
private function isIntersecting(A:Point, B:Point, C:Point, D:Point):Boolean
Thanks in advance.