I was wondering how do you draw the actual shape of the box2d objects? Right now Im doing this:
CCSprite *block = [CCSprite spriteWithFile:@"box.png"];
block.position = ccp(x, y);
//block.tag = 2;
[self addChild:block];
// Create block body
b2BodyDef blockBodyDef;
blockBodyDef.type = b2_dynamicBody;
blockBodyDef.position.Set(x/PTM_RATIO, y/PTM_RATIO);
blockBodyDef.userData = block;
b2Body *blockBody = world->CreateBody(&blockBodyDef);
// Create block shape
b2PolygonShape blockShape;
blockShape.SetAsBox(width/PTM_RATIO/2,
Height/PTM_RATIO/2);
// Create shape definition and add to body
b2FixtureDef blockShapeDef;
blockShapeDef.shape = &blockShape;
blockShapeDef.density = 100.0;
blockShapeDef.friction = 0.9;
blockShapeDef.restitution = 0.0f;
blockBody->CreateFixture(&blockShapeDef);
where there is a sprite attached with an image, but how do I see the actual shape? To see if the image and the box2d object are matching up correctly. Thanks.