You we're right, of course. I had the 2.0 version.
But, finally, after several hours of trouble migrating my project from 2.0 to 2.1 i got an edge working!
Here's the code if anyone is interested:
Code:
b2BodyDef edgedef;
edgedef.position.Set(0.f,10.f);
b2Body* edge = world->CreateBody(&edgedef);
b2Vec2 vertices[2];
vertices[0].Set(0.0f, 0.0f);
vertices[1].Set(10.0f, 0.0f);
int32 count = 2;
b2PolygonShape polygon;
polygon.Set(vertices, count);
b2FixtureDef edgefixtureDef;
edgefixtureDef.shape = &polygon;
edge->CreateFixture(&edgefixtureDef);
As you said it's just a polygon with two vertices
The new version is great actually, I'm glad i upgraded. Not having to specify worldAABB is great.