Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 1.19 KB

File metadata and controls

24 lines (15 loc) · 1.19 KB

2D-Rotated-Rectangle-Collision-Detection

Some functions to help check the collision between two rotated rectangles and specific examples

HOW TO USE

2d_rotated_rectangle_collision.lua

love_oPlXeGlE4K

Pass the coordinates of the vertices of two rectangles to the function rotated_rectangle_collision_detection(). The function will return true or false.

rotated_rectangle_collision_detection(ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy, gx, gy, hx, hy)

EXAMPLE

I have written an example for you to check. I use love2d to create it, you can download love2d here: https://love2d.org/

or you can run main.exe

love_zd7YNEkLH4 love_5gCr3WMZhi love_TUK2gifIV5 love_4AYCEynmsL