Does anyone have experience with implementing Nape physics engine in flashpunk. What i am trying to do is add a nape body to my flashpunk grid made in Ogmo. I thought of adding 32 by 32 square for every “1” in the grid data but Im not sure how to get the location of each. from the loadfromstring method?
public class Solid extends Entity {
public var border:Body = new Body(BodyType.STATIC);
public function Solid(x:int, y:int, image:Graphic, grid:Grid)
{
mask = grid; graphic = image; type = "Solid";
//Nape body border.shapes.add(new Polygon(Polygon.rect(0, 0, 32, 32))); border.space = theGameWorld.space;
}
override public function update():void {
x = border.position.x;
y = border.position.y;
}
}