I just understood How SAT in 3d works.
Now want to figure out how to resolve the collision, that means separate the objects.
Can someone tell me?
i used this code :
but it dowsent work on all faces
bool FindMTD3d(Vector3d* xAxis, float* taxis, int iNumAxes, Vector3d& N, float& t)
{
// nope, find overlaps
int mini = -1;
t = 0.0f;
N = Vector3d(0, 0,0);
for(int i = 0; i < iNumAxes; i ++)
{
float n = xAxis[i].Normalise();
taxis[i] /= n;
if (taxis[i] > t || mini == -1)
{
mini = i;
t = taxis[i];
N = xAxis[i];
}
}
return (mini != -1);
}