About the Physiceditor feature add
Dionysoslai ([email protected]) 2015/1/12
When using box2d, it is very difficult to get a physical object's geometry, usually a slightly more complex physical object, generally cannot use simple geometric composition. If we manually tune the data, the workload is very large, so we need a tool that can help us get to the physical object structure quickly. Physiceditor is a tool for acquiring physical objects.
Physiceditor is a codeandweb product (Texturepacker is also the company's products), as follows: Https://www.codeandweb.com/physicseditor/download.
Demand Analysis: Physiceditor provide source code can not change the size of geometric objects in real time
Using Physiceditor, you can quickly help us get physical objects quickly, but the code provided by Codeandweb (the code address is as follows: https://github.com/CodeAndWeb/ Physicseditor-cocos2d-x-box2d.git), the function is relatively poor single, just a very simple implementation of the binding has done the geometric object. If, there is a requirement as follows: The original physical A, whose geometry is p, but the physical a will "grow" over time, then the geometric object P also follows "grow up". This demand, in the game "violent fruit", is clearly manifested. However, the "violent fruit" game, geometric objects are circular, that is to say that they do not need to use the Physiceditor tool, so there is no single problem of this tool function. If physical A's geometry p is obtained from p, then the problem comes.
As a result, it rewrites its read-write data file, adding that it can automatically zoom in and out of geometric objects.
Rescue Solution:
Demo:https://github.com/dionysoslai/physiceditor
File: Gb2shapecache-x.h Gb2shapecache-x.cpp is the core library file.
About the Physiceditor feature add