Skip to content

bananaback/2D-Rotated-Rectangle-Collision-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages