0
我創造瞭如下的Box2D的身體,這對我的代碼創造物理學體在cocos2d
b2BodyDef carBodyDef;
carBodyDef.position.Set(x/PTM_RATIO,y/PTM_RATIO);
carBodyDef.type=b2_dynamicBody; b2Body* carBody=physicsWorld->CreateBody(&carBodyDef);
b2CircleShape carShape;
carShape.m_radius=rad/40.0f;
b2FixtureDef carFixture;
carFixture.shape=&carShape;
carFixture.density = 1.0f;
carFixture.friction = 0.0f;
carBody->CreateFixture(&carFixture);
return carBody ;
當正在運行的應用程序,它越來越崩潰, 與下面埃羅 *斷言失敗:(IsLocked()== false),函數CreateBody, * in box2d