2

given the situation here

http://jsfiddle.net/h902cLpy/

is it possible to detect that a line going from A to B does cross another shape while A to C doesn't?

topcat
  • 21
  • 1
  • 2
    This answer could help you : http://stackoverflow.com/a/565282/3568090 You could check for each side of the triangle. – Heckel May 18 '15 at 22:22
  • I won't steal Heckel's answer, but what he points to is good. Basically, go through every line segment of your shape, and calculate if line AB intersects. If you get an intersection on any segment, then yes it intersects the shape. If none, then no. – Tim Holt May 19 '15 at 02:34

0 Answers0