Box2D setup and debug drawing
In our first physics recipe, we will explore the basics of creating a Box2D project and setting up a Box2D world. The example creates a scene that allows the user to create realistic 2D blocks.
Please refer to the project RecipeCollection02 for full working code of this recipe.
How to do it...
The first thing we need to do is create a Box2D project using the built-in Box2D project template:
- Go to File | New Project.
- Under User Templates click on Cocos2d.
- Now, right click on Cocos2d Box2d Application.
- Click Choose ...