Another bugfix in the serialization (recently introduced), it is a mine field ;-)

A fix for btSubSimplexConvexCast, don't add a point of the Minkowski sum if it wasn't already in the voronoi simplex (similar to GJK)
This commit is contained in:
erwin.coumans
2010-03-02 20:37:11 +00:00
parent 8b1e1c9fdf
commit 658979c3ac
2 changed files with 5 additions and 2 deletions

View File

@@ -114,7 +114,10 @@ bool btSubsimplexConvexCast::calcTimeOfImpact(
hasResult = true;
}
}
m_simplexSolver->addVertex( w, supVertexA , supVertexB);
///Just like regular GJK only add the vertex if it isn't already (close) to current vertex, it would lead to divisions by zero and NaN etc.
if (!m_simplexSolver->inSimplex(w))
m_simplexSolver->addVertex( w, supVertexA , supVertexB);
if (m_simplexSolver->closest(v))
{
dist2 = v.length2();