make gjk a bit more robust, try different initial guess vector if it fails to find a solution (happens for queries with large differences in shape size)

This commit is contained in:
Erwin Coumans
2018-05-25 08:18:12 +10:00
parent abeae7e1e7
commit a9ff5246c9
2 changed files with 44 additions and 26 deletions

View File

@@ -35,7 +35,7 @@ subject to the following restrictions:
btScalar gGjkEpaPenetrationTolerance = 1e-7;
#else
#define REL_ERROR2 btScalar(1.0e-6)
btScalar gGjkEpaPenetrationTolerance = 0.001;
btScalar gGjkEpaPenetrationTolerance = BT_LARGE_FLOAT;
#endif
//temp globals, to improve GJK/EPA/penetration calculations