I'm trying to make my own physic engine based on Box2D Lite but I'm having problem with the stability. I'm using my own collision detection function and I don't use any of the contact caching that Box2D Lite uses. If I use 10 iterations my simulation gets very unstable after around 5 boxes on each other. However, when I have 50 iterations the simulation is stable until around 12 stacks.
50 iterations is way to much and my question is what I can do to increase the stability on less iterations.
I have tried to implement the contact caching, accumulated impulses and warm starting but they don't make anything better for me. I guess they should since they do so for Box2D Lite. Anyway, what's the most important thing to get a stable simulation on 10 iteration, and what should I focus on adding?
Sorry for being messy, I hope you at least can give some advice. Thanks a lot.
50 iterations is way to much and my question is what I can do to increase the stability on less iterations.
I have tried to implement the contact caching, accumulated impulses and warm starting but they don't make anything better for me. I guess they should since they do so for Box2D Lite. Anyway, what's the most important thing to get a stable simulation on 10 iteration, and what should I focus on adding?
Sorry for being messy, I hope you at least can give some advice. Thanks a lot.