Previously, while adding physics objects, whenever we wanted to add an object with an odd shape, we had to get the vertices and make sure that all the angles were convex. However, with PhysicsEditor, we don't have to worry about this. PhysicsEditor takes care of such cases automatically. Let's take a look at how to implement it.
The trial version of PhysicsEditor can be downloaded from the CodeAndWeb website at https://www.codeandweb.com/physicseditor.
Once downloaded, open the application.
PhysicsEditor has three panels, which are as follows:
The Shapes panel is where we will drop the images that we want to create the shape for
The panel in the middle is the Preview panel that will show a preview of the shape that is created for the object
The Exporter panel on the right-hand side is where we will specify the exporter file type. As we are on the Mac, we will use the Plist format for Cocos2d.
The image shows the location of the image that you added in the Shapes panel...