In a nutshell, we added a more reliable check, based on if the origin is in the GJK simplex, to determine if we are really intersecting and need to run EPA.
See also "Real-time Collision Detection with Implicit Objects" by Leif Olvang
Todo: integrate the simplex penetration check directly inside the Bullet btVoronoiSimplexSolver
and remove this temporary code from libCCD
Note, for large differences in shapes, use double precision build!
This commit is contained in:
erwincoumans
2018-08-30 18:35:51 -07:00
parent 4f7dfc2069
commit ee9fca8c29
2 changed files with 965 additions and 221 deletions

View File

@@ -33,8 +33,8 @@ bool btGjkEpaPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& simp
(void)simplexSolver;
btVector3 guessVectors[] = {
btVector3(transformB.getOrigin() - transformA.getOrigin()),
btVector3(transformA.getOrigin() - transformB.getOrigin()),
btVector3(transformB.getOrigin() - transformA.getOrigin()).normalized(),
btVector3(transformA.getOrigin() - transformB.getOrigin()).normalized(),
btVector3(0, 0, 1),
btVector3(0, 1, 0),
btVector3(1, 0, 0),

File diff suppressed because it is too large Load Diff