Collision versus contact
There are two types of interaction when physics bodies come together in the same space:
Collision: This is the physics simulation's mathematical analysis and repositioning of bodies after they touch. Collisions include all the automatic physical interactions between bodies: preventing overlap, bouncing apart, spinning through the air, and transferring momentum. By default, physics bodies collide with every other physics body in the scene; we have witnessed this automatic collision behavior in our game so far.
Contact: This event also occurs when two bodies touch. Contact events allow us to wire in our custom game logic when two bodies come into contact. Contact events do not create any change on their own; they only provide us with the chance to execute our own code. For instance, we will use contact events to assign damage to the player when he or she runs into an enemy. There are no contact events by default; we will manually configure contacts in this chapter.
Physics...