Physics & Collisions
In this chapter, you’ll learn more about editing physics properties with SpriteBuilder and how to control the player through physics rather than actions. You’ll add impenetrable physics bodies as level borders to prevent the player character from moving outside the level boundaries.
You’ll also learn about how to run code when a collision occurs—in this case, to trigger game events like ending the current level—and how to set up collision categories and masks to allow certain physics bodies to pass through each other.
In the previous chapter, you already added a Physics node to the Level1.ccb and made the player node a child of the newly introduced Physics node. This instance of CCPhysicsNode ...