added boundingbox collision for polygons