Hi All,
I have recently been programming a very rudimentary 2d Physics Engine. I implemented SAT to check for Collision between convex polygons, and this gives me one to two contact points.
Collisions between Objects where just one Contact Point is generated get resolved just fine, but if i have 2 Contact Points, The Object begins to shake. For example, if a box falls on the ground due to gravity, it starts tilting to the right and left very fast. I believe the problem is, that on contact an Impulse gets applied to one Contact Point, and the box turns in the other direction. Then in the next step it penetrates the ground in the other Direction and gets an Impule in the other direction, and so on.
I tried several Methods by now, but nothing seems to fix the problem. Do i have to implement some kind of iterative solver?
How can you solve for 2 Contact Points efficiently? The way I am doing it right now, is to just resolve the Collision for each Contact Point, scaling the Impulse down by the ratio of the penetration depths.
If you know a possible Solution to my problem, or even just a hint in the right direction, please let me know!
Thank you in Advance.