
Код AS3:
rolyLevel=world.CreateBody(bodyDef);
var polygonShape:b2PolygonShape=new b2PolygonShape();
var fixtureDef:b2FixtureDef=new b2FixtureDef();
fixtureDef.shape=polygonShape;
fixtureDef.density=1;
fixtureDef.restitution=0;
fixtureDef.friction=1;
for (var i:Number=0; i<rolyPieces; i++) {
var angle:Number=2*Math.PI/rolyPieces*i;
polygonShape.SetAsOrientedBox(0.1,rolySide,new b2Vec2(rolyRadius/worldScale*Math.cos(angle),rolyRadius/worldScale*Math.sin(angle)),angle);
rolyLevel.CreateFixture(fixtureDef);
}
Так делается в box2d колесо из прямоугольников.
http://www.emanueleferonato.com/2012...-box2d-step-2/