Collision detection.