I'm creating a body with many vertices to collide with another bodies in the scene. This is done with b2ChainShape
, but I first tried creating a single edge of that chain (v2v
is the coordinates conversion method):
b2Vec2 v1 = [U v2v:CGPointMake(0, 150)];
b2Vec2 v2 = [U v2v:CGPointMake(50, 150)];
b2EdgeShape shape;
shape.Set(v1, v2);
This works as expected: other bodies collide with this edge. Strangely, when using the same vertices for the chain shape, there's no collision:
b2Vec2 vertices[2];
vertices[0] = [U v2v:CGPointMake(0, 150)];
vertices[1] = [U v2v:CGPointMake(50, 150)];
b2ChainShape shape;
shape.CreateChain(vertices, 2);
Any idea why? Do chains use some different coordinate system?