How to create a b2Body for CCArmature?

How to create a b2Body for CCArmature?
0.0 0



I am making a platformer game, and I want to add a b2Body to my player which is a CCArmature. I have tried some codes and looked at some samples like in testcpp. And i have tried this code like in testcpp but my game crashes. Can someone mayby help me out?

Code i using in createPlayerBody method.

b2BodyDef bodyDef;
bodyDef.type = b2_dynamicBody;
b2Body body = world~~>CreateBody;
and i am getting this error when i run my game
Assertion failed!
Program: …s\TheJourney\proj.win32\Debug.win32\TheJourney.exe
File: c:-gamesdev…2polyg…ape.cpp
Line: 137
Expression: edge.LengthSquared > 1.192092896e-07F
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts



Can someone help me please? I have tried just demo armatures from cocostudio they work good. But at mine armature it gives this error. I have tried to remake it a couple fo times but it don’t work.