posted 11 years ago
I think this discussion would fit better in the GUIs forum, so I shall move it.
I think you will have to work out how two shapes collide by comparing their locations. Draw two shapes on a piece of paper.
Example: Two “ball”s will collide with a straight line connecting their two centres. That line will consist of radii of the two shapes, and its length and direction can be calculated by the usual geometrical methods, maybe implemented by the hypot and atan2 methods of the Math class.