EdgeChainDef Collision problem

I'm a complete newbie to Box2D and I am forced to work on an older version of Jbox2d that has EdgeChainDef.
Basically I'm trying to achieve a hollow polygon ( a circle or an arc ). I have computed the points Vo..Vn in the anti-clockwise direction ( Vo is not equal to Vn ). I then try to create an EdgeChainDef with these points using the following code.

Code: Select all

        EdgeChainDef pd = new EdgeChainDef();
      
   pd.density = density;
   for (Vec2 vertex : vertices) {
      pd.addVertex(vertex);
   }
   pd.setIsLoop(false);

        body.createShape(pd)


I then create some dynamic bodies made out of regular polygondefs that fly around the screen. These objects collide with the edgechain from only one side. I want them to collide from both sides of the edge chain. What am I doing wrong here?

Also, if the method I'm using to create a static wall like above is not good, please suggest a better way to create static shapes.

Original thread: https://box2d.org/forum/viewtopic.php?t=8559