Hi guys,
A quick question. I am using an impulse based physical system which works well for AABB and Circles (including resolving the penetration depth).
However, when attempting to calculate the penetration depth for 2 x OBBs in contact, I am relaying on this function, which also incidently gives the surface normal of contact (that works well) along the axis of least penetration.
However, when i turn on my penetration solver, I have the OBBs jumping through each other and acting in a strange fashion. Of course I need the penetration depth to solve the sinking problem and to help stabilize the system.
I am rather new to SAT test, and I am not sure if I am missing something. Should the accompanying normal with the penetration returned by the function below not give me proper penetration depth?
float overlapDist(Projection p1,Projection p2){
if(p1.min>p2.max)
return (p2.max-p1.min);
else
return (p1.max-p2.min);
}
Thanks,
Mike