There are a couple of caveats to my answer, that I will get out of the way first:
It only deals with non-rotating bounding boxes.
It assumes that you are trying to deal with tunneling issues, i.e. issues caused by objects moving at high speed.
Once you have identified the MTV, you know the edge/surface normal you need to test against. You also know the linear velocity vector of the interpenetrating object.
Once you have established that at some point during the frame, an intersection occurred, you can then perform binary half step operations, based on the following starting points:
Identify the vertex that penetrated first during the frame:
vec3 vertex;
float mindot = FLT_MAX;
for ( vert : vertices )
{
if (dot(vert, MTV) < mindot)
{
mindot = dot(vert, MTV);
vertex = vert;
}
}
Once you have have the vertex identified, the binary half step becomes far less expensive:
//mindistance is the where the reference edge/plane intersects it's own normal.
//The max dot product of all vertices in B along the MTV will get you this value.
halfstep = 1.0f;
vec3 cp = vertex;
vec3 v = A.velocity*framedurationSeconds;
float errorThreshold = 0.01f; //choose meaningful value here
//alternatively, set the while condition to be while halfstep > some minimum value
while (abs(dot(cp,normal)) > errorThreshold)
{
halfstep*=0.5f;
if (dot(cp,normal) < mindistance) //cp is inside the object, move backward
{
cp += v*(-1*halfstep);
}
else if ( dot(cp,normal) > mindistance) //cp is outside, move it forward
{
cp += v*(halfstep);
}
}
return cp;
This is reasonably accurate, but will only provide a single collision point, in a single case.
The thing is, it's usually possible to tell in advance if an object will move fast enough per frame to be able to tunnel like this, so the best advice is to identify the leading vertices along velocity and do a ray test along the velocity vector. In the case of rotating objects, you will have to do some kind of binary halfstep slerp in order to assertain the correct contact point.
In most cases, though, it can be safely assumed that most objects in your scene will not move fast enough to penetrate that far in a single frame, so no half stepping is necessary, and discrete collision detection will suffice. High speed objects like bullets, which move too fast to see, can be raytraced for contact points.
Interestingly, this halfstep method can also give you the (almost) exact time that the object occurred during the frame:
float collisionTime = frametimeSeconds * halfstep;
If you are doing some kind of physics collision resolution, you can then correct the position of A by:
v - (v*halfstep)
then you can do your physics normally from there. The downside is that if the object moves reasonably fast, you will see it teleporting back along it's velocity vector.