Collision detection method