With JBox2D 2.2.1.1 I got this error that happens randomly:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at org.jbox2d.dynamics.Island.add(Island.java:566)
at org.jbox2d.dynamics.World.solve(World.java:1013)
at org.jbox2d.dynamics.World.step(World.java:598)
When I call world.step(1.0f / 25,4,3)
All my bodies are created like this:
BodyDef bd = new BodyDef();
bd.type = BodyType.DYNAMIC;
bd.position = position;
bd.angle = (float) Math.toRadians(angle);
bd.fixedRotation = false;
bd.linearDamping = LINEAR_DAMPING;
bd.angularDamping = ANGULAR_DAMPING;
bd.bullet = true;
mainBody = world.createBody(bd);
My code perform a lot of fixture creations and deletions. Deletion is done with mainBody.createFixture().
Someone have a clue? 🙂
Thank you,
mrgibson
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at org.jbox2d.dynamics.Island.add(Island.java:566)
at org.jbox2d.dynamics.World.solve(World.java:1013)
at org.jbox2d.dynamics.World.step(World.java:598)
When I call world.step(1.0f / 25,4,3)
All my bodies are created like this:
BodyDef bd = new BodyDef();
bd.type = BodyType.DYNAMIC;
bd.position = position;
bd.angle = (float) Math.toRadians(angle);
bd.fixedRotation = false;
bd.linearDamping = LINEAR_DAMPING;
bd.angularDamping = ANGULAR_DAMPING;
bd.bullet = true;
mainBody = world.createBody(bd);
My code perform a lot of fixture creations and deletions. Deletion is done with mainBody.createFixture().
Someone have a clue? 🙂
Thank you,
mrgibson