Checking collisions in the Box2D world
The Box2D physics library calculates all collisions automatically. Imagine now that we set up a ground body as the destination. Players win when they successfully move the car to hit the destination. As Box2D already calculates all collisions, all we have to do is get the detected collision list and determine whether our car has hit the destination ground.