Hello,
After I studied a less then minimal about jBox2D I saw the improvents I could have using slick, but when I search for some repo i find many. I don't know if github replicates for each user or something, but I would like to know if there is any official as I've been using currently
https://github.com/Kenkron/fizzy/ (which can be found on wiki).
Another thing, does the project still live on?
And with this repo I an having a issue when trying to use CompoundShape. A have made a program that opens a map created with Tiled and extract some points from it. Those are the borders of the unpassable tiles (is working nice, I thing). Then I add those points to Polygons (if there is more than one polygon) and add each to the CompoundShape. I am currently testing only one shape on the CompoundShape, but when I add to the world it cause a stackOverflow on
Code:
at org.newdawn.fizzy.CompoundShape.createInBody(CompoundShape.java:58)
When I tryied to setRestitution on this body after the constructor the error didn't happen there, but on the setRestitution
Code:
colBody = new StaticBody(cShape, 0, 0);
colBody.setRestitution(0.1f);
Code:
Exception in thread "main" java.lang.StackOverflowError
at java.util.ArrayList$Itr.<init>(ArrayList.java:780)
at java.util.ArrayList$Itr.<init>(ArrayList.java:780)
at java.util.ArrayList.iterator(ArrayList.java:774)
at org.newdawn.fizzy.CompoundShape.setRestitution(CompoundShape.java:90)
An ps is that if I use only 'Shape' instead of compound shape (same Polygon) it works.
Am I breaking any rule?
edit:
I've solved my error. The polygon wasn't being added properly. Now I have it working, but with some strange behavior (often dynamic objects start floating).