Optimized the collision for tiles