0

I am new to Box2d using with COcos2d IOS and started making different simple bodies and now I am having problem with getting the vertices of some shapes(i.e mySprite.png) like irregular shapes that are not convex. How can I convert those shapes to convex so that their body collision work accurately ??

Should I have to break those Concave Shapes into smaller Convex parts which is kind of hectic task is their any easy way or some Algorithm for this.

Please also provide helping material links

I shall be very thankfull for you help and concern.

Regards Abi..

  • Try PhysicsEditor and this question http://stackoverflow.com/questions/4323619/concave-and-convex-polygon?rq=1 – CodeSmile Dec 14 '12 at 12:50

1 Answers1

0

If you are working with flash this class is good solution: http://www.emanueleferonato.com/2011/09/12/create-non-convex-complex-shapes-with-box2d/

I'm working with box2dWeb and I couldn't find better solution than to break Concave shape into smaller Convex parts, and then to connect all them with "Weld joint".

The free tool which helped me a lot with this, is "box2d-editor" : http://code.google.com/p/box2d-editor/