I would like to create a dynamic body with fixed position, but not fixed rotation.
The reasons: I need to catch collisions into the body, but have it not move. I also need to spin the body, and have damping of the spinning.
So, I don't want the body to move position, I want it to rotate, but I want there to be spinning damping.
unfortunately body.setFixedPosition doesn't exist. body.setFixedRotation does.
My: current solution:
Vector2 vPos = oBody.getPosition(); //grab position
world.step(1 / 60f, 6, 2); //do the physics thing
oBody.setTransform(vPos, oBody.getAngle()); //restore the position.
Anyone have a better solution?
The reasons: I need to catch collisions into the body, but have it not move. I also need to spin the body, and have damping of the spinning.
So, I don't want the body to move position, I want it to rotate, but I want there to be spinning damping.
unfortunately body.setFixedPosition doesn't exist. body.setFixedRotation does.
My: current solution:
Vector2 vPos = oBody.getPosition(); //grab position
world.step(1 / 60f, 6, 2); //do the physics thing
oBody.setTransform(vPos, oBody.getAngle()); //restore the position.
Anyone have a better solution?