/** * Code found at: http://stackoverflow.com/a/21647567 */ public static boolean collidePolygon(int ax, int ay, int aw, int ah, double angle, int bx, int by, int bw, int bh, double bAngle) { Vector[] pointsA = getBounds(ax, ay, aw, ah, angle); Vector[] pointsB = getBounds(bx, by, bw, bh, bAngle); return collidePoints(pointsA, pointsB); }