# Box2D body rotation problem

When my player jumps, I start a rotation and I want to finish it when he gets back on the ground.

My Player is jumping off the ground and landing back on in 1 second.

My physics are updating at 10 FPS (10 times per second).

So I want to complete a 180 degree rotation for exactly 1 second. I add 18 degree to my player at every world update. I convert the degrees to radians, but the result is this:

I want him to jump with a 0 degree angle, rotate and land with 0 degree angle. Here is my code:

world.step(step, 8, 3);

if(isJumping) {
angle -= (18*Math.PI)/180; // conver degrees to radians
player.body.setTransform(player.body.getPosition(), angle);
}

• Or option 3, keep as is. I think it kind of looks cool :P – Coburn Oct 11 '16 at 18:52