Line rectangle collision?
How do I do line rectangle collision? It seems way more complex than usual, here's the code. I'm trying to make r1 collide with the blue lines on r2. The collision method is vertextIntersect() in the Rect object. I am not asking for rect collision, I am asking for line rect collision. The code draws blue lines over the second rectangle, I want to collide with 1 line. https://code.sololearn.com/W7N67EeZEjkC/?ref=app