Polygon collision detection added