O'Reilly logo

Cocos2d-x Cookbook by Akihiro Matsuura

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Physics Editor

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.

Getting ready

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.

How to do ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required