Some functions to help check the collision between two rotated rectangles and specific examples
2d_rotated_rectangle_collision.lua
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)
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




