-
Book Overview & Buying
-
Table Of Contents
Cocos2d-x cookbook
By :
In Chapter 9, Controlling Physics, you learned about Physics Engine. We can create physics bodies to use Cocos2d-x API. However, we can only create a circle shape or a box shape. Actually, you have to use complex shapes in real games. In this recipe, you will learn how to create a lot of shapes using Physics Editor.
Physics Editor is created by the same company that created Texture Packer. Physics Editor is a paid application. But you can use a free trial version. If you don't have it, you can download it by visiting the https://www.codeandweb.com/physicseditor
Here, you prepare the image to use this tool. Here, we will use the following image that is similar to a gear. This image's name is gear.png.

First of all, you will create a physics file to use Physics Editor.
Launch Physics Editor. Then, drag the image gear.png to the left pane.

Click on the shaper tracer icon that is the third icon from the left in the tool bar. The shaper tracer icon...
Change the font size
Change margin width
Change background colour