Original Post
I am trying to create a 2d physics engine mainly dealing with simulating rigid bodies. Everything seems to work fine except for when objects stack up on each other. In my simulations the top object always seems to "sink" inside the other. Or worse, when an object is sliding down another, one of its vertices will slip inside the structure of the other body, thus haulting the entire simulation.
I know this is a really general question, and you dont even know anything about the structure of my engine, but do any of you have some general methods of fixing this that I can try out? The demos that Chris Hecker made for his articles on rigid body dynamics dont have the problem but I cant really see why his works and mine doesnt. I would be happy if mine would handle like his (even with the crazy jumpiness of the objects when they are resting on the floor).
Thanks