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:
@@ -306,7 +306,7 @@ const char* btCompoundShape::serialize(void* dataBuffer, btSerializer* serialize
|
||||
memPtr->m_childMargin = float(m_children[i].m_childMargin);
|
||||
memPtr->m_childShape = (btCollisionShapeData*)serializer->getUniquePointer(m_children[i].m_childShape);
|
||||
//don't serialize shapes that already have been serialized
|
||||
if (!serializer->findPointer(memPtr->m_childShape))
|
||||
if (!serializer->findPointer(m_children[i].m_childShape))
|
||||
{
|
||||
btChunk* chunk = serializer->allocate(m_children[i].m_childShape->calculateSerializeBufferSize(),1);
|
||||
const char* structType = m_children[i].m_childShape->serialize(chunk->m_oldPtr,serializer);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user