pixel-examples/community/line-collisions
Ben Cragg bb7baf0c7c Added screenshot 2019-04-15 11:17:10 +01:00
..
README.md Added screenshot 2019-04-15 11:17:10 +01:00
lineCollisionScreenshot.png Initial commit 2019-04-15 11:15:14 +01:00
main.go Better structure 2019-04-10 11:34:20 +01:00

README.md

Line Collisions

Line collisions is a basic example of how to detect line collisions with a rectangle.

Screenshot

Instructions

You can set the rectangle position using a left-click of the mouse.

You can set the line position with two right-clicks of the mouse; the first right-click will set the beginning of the line the second will set the end of the line.

Any intersection points where the rectangle and line intersection will appear as red dots.