I ask because of this issue:
https://www.youtube.com/watch?v=zCJwxk0 ... e=youtu.be
https://github.com/bulletphysics/bullet3/issues/57
its not usable ... someone need to fix that

Code: Select all
// //if (m_fixContactNormalDirection)
//{
// ///@workaround for sticky convex collisions
// //in some degenerate cases (usually when the use uses very small margins)
// //the contact normal is pointing the wrong direction
// //so fix it now (until we can deal with all degenerate cases in GJK and EPA)
// //contact normals need to point from B to A in all cases, so we can simply check if the contact normal really points from B to A
// //We like to use a dot product of the normal against the difference of the centroids,
// //once the centroid is available in the API
// //until then we use the center of the aabb to approximate the centroid
// btVector3 aabbMin,aabbMax;
// m_minkowskiA->getAabb(localTransA,aabbMin,aabbMax);
// btVector3 posA = (aabbMax+aabbMin)*btScalar(0.5);
//
// m_minkowskiB->getAabb(localTransB,aabbMin,aabbMax);
// btVector3 posB = (aabbMin+aabbMax)*btScalar(0.5);//btVector3 diff = posA-posB;
// //if (diff.dot(normalInB) < 0.f)
// // normalInB *= -1.f;
//}