Iterations ?

m_velocityIterations
m_positionIterations

what should i set these to ?
thank you
The default in the examples is 10. You can set it to lower or higher. The consequences of setting it lower is less fine detail in the simulation, but a possible speed increase. The opposite is true of setting them higher.

Experimentation might be in order. As with all physics engines, they will only take you so far since they are only a simulation of real physics. Adjustments should be made to get the 'look' you want.
thankyou.
so should they be the same ?
You generally only need 2 or 3 position iterations. Velocity iterations improve stability. Position iterations improve overlap resolution.
What is overlap resolution?
Most physics systems operate on two parts related to collisions, collision detection and collision response. If two bodies collide then in reality that means they are overlapping (or will overlap in the case of Continuous Collision Detection) and need to have their positions corrected. Since box2d is an iterative approach it functions better with small iterations to reduce the errors. So velocity iterations helps to improve stability by integrating the velocity and acceleration over several small timesteps. Position iterations help to reduce the errors created when attempting to do position correction.

And no, they don't have to be the same. Use what works best for your simulation.

@Erin
I didn't know that a position iteration of 2 or 3 would be sufficient. I'll have to test that in my simulations and see what effect it has. Have the testbeds been updated to reflect this?
Here are the current settings in the C++ testbed:

velocity iterations: 8
position iterations: 3

Original thread: https://box2d.org/forum/viewtopic.php?t=4396