Intersecting Boxes
Haz clic dentro del juego para activar los controles.

Haz clic dentro del juego para activar los controles.
Using getBounds, it's fairly easy to determine the points of intersection for two rectangular shapes. This provides two such shapes and forms another to reside within the intersection of those two.