Creating physics bodies in the world
In this recipe, we will be creating a fresh game project and will set it up to be used in all the recipes. The game project will hold together the creation of a physics world along with some physics body objects. We will be using these physics objects to add joints between them.
Getting ready
To develop a mini game using the physics engine, start by creating a new project. Open Xcode and go to File | New | Project and navigate to iOS | Application | SpriteKit Game. In the popup, provide the product name as Physics Joints
and navigate to Devices | iPhone and click on Next as shown in the following screenshot:
Click on Next and save the project on your hard drive.
Once the project is saved, you should be able to see project settings. In this project settings page, just uncheck the Portrait from the Device Orientation section as we are supporting only landscape mode for this game. The final screen should look something similar to following screenshot: