How to check if lines intersect or not?

Hi, i’m making a detection system for lines in 2D plane, i can’t use raycasts sadly, i’m making a program that checks if point is inside polygon or not, to do that i found that if i’ll use 4 lines from the point in each direction perpendicular to each other, and if they’ll touch polygon lines , they’ll be in, but i have to find if line intersect or not, soo how to do that, i mean, like in this scenario:

2 Likes

This question has been asked and answered numerous times on the forum. Next time do a little bit of digging before making a thread. It saves both your time and the people trying to help.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.