Polygon collision detection added.