Rect Overlap error

Glad you worked it out!

Just noting for posterity that there are two approaches here, and either approach will work on its own. The first is matrix transformations.

And the second is poly-poly collision detection:

If you express your rotated rects directly as polygons then you can avoid screenX-style matrix coordinate recovery entirely, and just compare then as polygons to other polygons – which works on any combination of rectangle (rotated or not), rhombus, triangle, hexagon, et cetera.