Hi !
I'm using http://www.physicseditor.de/ to create some specific object.
This tool use setAsArray method to create body which is no more in this port of Box2D.
Any idea how can I replace it ?
Thanks!
I'm using http://www.physicseditor.de/ to create some specific object.
This tool use setAsArray method to create body which is no more in this port of Box2D.
Code:
var p:Number;
var polygons:Array = fixture[8];
for(p=0; p<polygons.length; p++) {
var polygonShape:b2PolygonShape = new b2PolygonShape();
polygonShape.SetAsArray(polygons[p], polygons[p].length);
fixtureDef.shape=polygonShape;
body.CreateFixture(fixtureDef);
}
var polygons:Array = fixture[8];
for(p=0; p<polygons.length; p++) {
var polygonShape:b2PolygonShape = new b2PolygonShape();
polygonShape.SetAsArray(polygons[p], polygons[p].length);
fixtureDef.shape=polygonShape;
body.CreateFixture(fixtureDef);
}
Any idea how can I replace it ?
Thanks!