ChainShape in Box2D
<p><br>
I recently began to learn libgdx and I am stuck at a problem with the CainShape of Box2D.</p>

<p>My first goal is to simply create a box with a ChainShape.</p>

<p>In order to achieve that, I added four Vector2 to an array and use them to create a loop.</p>

<p>The result is depending on the arrangement in the array either an hourglass shaped thing (top left is connected with bottom right and top right is connected with bottom left) or the error </p>

<blockquote>
  <p>Expression: b2DistanceSquared(v1, v2) > 0.005f * 0.005f</p>
</blockquote>

<p>This is the code I used so far:</p>

<pre><code>Vector2[] box = new Vector2[4];

    box[1] = new Vector2(0 -    bounds.getWidth() / 2 / Main.PPM, 0 -   bounds.getHeight() / 2 / Main.PPM);


    box[0] = new Vector2(       bounds.getWidth() / 2 / Main.PPM, 0 -   bounds.getHeight() / 2 / Main.PPM);


    box[2] = new Vector2(0 -    bounds.getWidth() / 2 / Main.PPM,       bounds.getHeight() / 2 / Main.PPM);


    box[3] = new Vector2(       bounds.getWidth() / 2 / Main.PPM,       bounds.getHeight() / 2 / Main.PPM);

    ChainShape chainShape = new ChainShape();
    chainShape.createLoop(box);

    fdef.shape = chainShape;
    fixture = body.createFixture(fdef);
</code></pre>

<p>I hope somebody can tell me what I am missing.<br>
Thanks in advance!</p>