Always springy

Hi All and thanks for the great library! Got a small one: even after setting restitution to 0 bodies still springy. This is even more apparent when vertically stacking them. All bodies are same: single box shape, same size. Any ideas?

I've seen Eric referring to b2MixRestitution() in General Discussion, but mixing shouldn't matter here since all bodies have zero restitution.

Thanks!
It sounds like what you are seeing is not the restitution at work. Rather, it is more likely the number of constraint iterations per time step. When I tested by dropping four blocks, at the same time onto a static surface, I saw a spring effect on impact between the dynamic bodies for values less than 8. I typically use 10 for general purpose and higher (like 100 or so) if I'm really pushing constraints hard. You can set this value at each time step when you call world.step( dt, iterations ).

Another thing to consider if you're planning on doing stacking is to make sure that warm starting is enabled. The more you stack, the higher the iterations will need to be to keep the lower boxes from penetrating each other.
Many thanks for help! Yes, the reason appeared to be the constraint iterations - at 100 things are rock-solid! Even 20 is already better than the default 10 btw. Played with warm starting too - 'false' gives very odd physics for me - I see this flag is set to true by default in the World constructor - clearly for a reason 😮 Cheers!

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