Currently I have a mini physics game which uses Separating Axis Theorem for collision detecting and response, however I came to a standstill when I discovered that there wasn't much documentation on what happens to an object's velocity after it collides with another shape using SAT collision detection.
Here are two diagrams of what I'm talking about.
Can anyone point me into a right direction please?
All information that can be given after the collision is the minimum penetration vector.
EDIT: Found some code online that's very related to this but I don't understand it:
void CBody::ProcessCollision(CBody& xBody, const Vector& N, float t)
{
Vector D = m_xDisplacement - xBody.m_xDisplacement;
float n = D * N;
Vector Dn = N * n;
Vector Dt = D - Dn;
if (n > 0.0f) Dn = Vector(0, 0);
float dt = Dt * Dt;
float CoF = s_fFriction;
if (dt < s_fGlue*s_fGlue) CoF = 1.01f;
D = -(1.0f + s_fRestitution) * Dn - (CoF) * Dt;
float m0 = GetInvMass();
float m1 = xBody.GetInvMass();
float m = m0 + m1;
float r0 = m0 / m;
float r1 = m1 / m;
m_xDisplacement += D * r0;
xBody.m_xDisplacement -= D * r1;
}