I have been working on a physics simulation module. Almost everything works properly, but I am having an issue, which I have demonstrated in the following video.
As you can see in the video, if an object doesn't have an angular velocity, everything is OK. But once an angular velocity (even just a little) is applied to the object and it collides with the ground, it begins to shake.
I check for collision and get the normal and MTD (Minimum Translation Distance) using SAT (Separating Axis Theorem).
To get the contact point, I check for intersections between the two polygons. If there is more than one point of intersection, I then find the point in between the two intersection points.
Then I resolve overlapping objects by using the normal, MTD, and mass factor. To solve the collision, I use the Impulse theory.
Do you have any idea what might be causing this shaking effect? Could it be caused by a wrong choice of contact points?