I’ve created a “leaning wall” with box2d using the b2PolygonShape.SetAsArray function, and my player object (dynamic b2CircleShape) is able to push into it and eventually pass through it. However when I use SetAsBox it will no longer pass through it. Does anybody have an idea as to why this is happening?
The array I am using:
// array
var vertices:Array = [];
vertices[0] = new b2Vec2(0, 0);
vertices[1] = new b2Vec2(0, 506);
vertices[2] = new b2Vec2(50, 506);
vertices[3] = new b2Vec2(100, 0);
You need to reverse the order of these vertices so that the polygon is ‘wound’ counter-clockwise.