Detect line line collision in an Untangled game

Posted by Vish on Game Development See other posts from Game Development or by Vish
Published on 2012-03-22T08:42:09Z Indexed on 2012/03/22 11:40 UTC
Read the original article Hit count: 573

Filed under:
|

Pardon me if this is a repeat question,but I've been searching google for vain since the past few days, I'm a flash actionscript game developer who is a bit backward with mathematics, though I find physics both interesting and cool.

Similiar game : 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. Vishnu Ajit

© Game Development or respective owner

Related posts about math

Related posts about linear-algebra