We had a problem when colliding a large box and a small capsule: once in a while when the capsule was inside the box no collision would be returned.
It seems the function projectorigin(vector a,vector b,vector c,vector d, scalar w, int mask) in btGjkEpa2 would return a different mask (14 instead of 15 ) for no reasons in some bad configuration.
In our case we would get a very small mindist (around 10e-8) and not go into that code:
Code: Select all
if(mindist<0)
{
mindist = 0;
m = 15;
w[0] = det(c,b,d)/vl;
w[1] = det(a,c,d)/vl;
w[2] = det(b,a,d)/vl;
w[3] = 1-(w[0]+w[1]+w[2]);
}
Code: Select all
if(mindist<GJK_MIN_DISTANCE)
{
mindist = 0;
m = 15;
w[0] = det(c,b,d)/vl;
w[1] = det(a,c,d)/vl;
w[2] = det(b,a,d)/vl;
w[3] = 1-(w[0]+w[1]+w[2]);
}
cheers,
Gilles