var maxCount:int = Math.min(convex.length, b2Settings.b2_maxPolygonVertices );
var gridCount:Number = convex.length/maxCount;
var thinVertices:Array = new Array();
for(var i:uint =0;i<maxCount;i++){
var count:uint = i*gridCount
>>0;
thinVertices.push(convex[count]);
}
for(i=0;i<thinVertices.length;i++){
shapePoly.vertices[i] = new b2Vec2(thinVertices[i].x, thinVertices[i].y);
}
shapePoly.vertexCount = thinVertices.length;
// ========== 生成 ==========
body = m_world.CreateDynamicBody(bodyDef);
body.CreateShape(shapePoly);
body.SetMassFromShapes();
//addChild(bodyDef.userData);
よろしくお願いします。