You really don’t need much context for this, here’s what’s happening:
Much easier to see in the MP4 format, here:
Here’s the transform code:
if(bounding.getType() == BodyType.DYNAMIC){
//"Position iterations" is the 3rd parameter in the World step(), but multiplied by 10.
//So in my world step I have, world.step(1 / 60f, 8, getPositionIterations / 10); and
//getPositionIterations returns 30
Vec2 bodyPosition = bounding.getPosition().mul(Game.getWorldContext().getPositionIterations());
modelMatrix.translate(new Vector3f(bodyPosition.x, bodyPosition.y, 0));
modelMatrix.rotate((float) Math.toDegrees(bounding.getAngle()), new Vector3f(0, 0, 1));
}
And if this is of any importance
if(Keyboard.isKeyDown(Keyboard.KEY_LEFT)) bounding.applyAngularImpulse(+0.1f);
I’ll add more code by request, I also appologize for the crappy structure. I didn’t think this “physic system implementation” out very well. I’m still super new on Jbox2D.