Collision detection sample