くみこみれい②
// Define the dynamic body.
//Set up a 1m squared box in the physics world
bodyDef.type = b2_dynamicBody;
bodyDef.position.Set(100/PTM_RATIO, 100/PTM_RATIO);
body = world->CreateBody(&bodyDef);
// add the fixture definitions to the body
[[GB2ShapeCache sharedShapeCache] addFixturesToBody:body
forShapeName:name];
[sprite setAnchorPoint:[[GB2ShapeCache sharedShapeCache]
anchorPointForShape:name]];
[sprite setPhysicsBody:body];