toucansam wrote:
can you verify which version of the engine you're using?
From the pom.xml file I find
"version: 2.1.2.1".
I also use
Fizzy wrapper, so creating the bodies is a little easier. I hope you don't blame Fizzy, since the wrapper is so simple that I don't think it's causing the bug. Well, I could be wrong.
Here's why I think the body's reference point has something to do with the bug:
When I create a body using the coordinates {9.6 , 2.5} , {10.0 , 2.5} , {10.0 , 10.0} , {9.6 , 10.0} with a reference point
0,0I get the bug.
But when I use coordinates {-0.2 , -3.75} , {0.2 , -3.75} , {0.2 , 3.75} , {-0.2 , 3.75} with the reference point at
9.8 , 6.25the bug disappears. Now the reference point (the body's origin) is at the center of the body. The body is still at the same location, with the same measurements. You can double-check the coordinates.
EDIT:
okay, just found out the bug occurs only when a box (rectangle) collides with the wall. Circles collide correctly.
The problem might be in JBox2D, since the world's physics update in Fizzy calls only two methods:
Code:
jboxWorld.step(timeStep, velocityIterations, positionIterations);
resolveOutOfBounds();
This means that Fizzy has nothing to do with the actual physics simulation. Now, this could mean that either there is a bug in JBox2D, or Fizzy gives some crazy values for the jbox bodies. What do you guys think?