How Does Collision Detection Work