fix indexing bug in deformable sleeping

This commit is contained in:
Xuchen Han
2019-11-03 12:44:45 -08:00
parent 457ed0e735
commit 1bd0eee0ff
2 changed files with 4 additions and 0 deletions

View File

@@ -251,6 +251,7 @@ void btDeformableBodySolver::updateVelocity()
psb->m_maxSpeedSquared = 0;
if (!psb->isActive())
{
counter += psb->m_nodes.size();
continue;
}
for (int j = 0; j < psb->m_nodes.size(); ++j)
@@ -275,6 +276,7 @@ void btDeformableBodySolver::updateTempPosition()
btSoftBody* psb = m_softBodies[i];
if (!psb->isActive())
{
counter += psb->m_nodes.size();
continue;
}
for (int j = 0; j < psb->m_nodes.size(); ++j)
@@ -307,6 +309,7 @@ void btDeformableBodySolver::setupDeformableSolve(bool implicit)
btSoftBody* psb = m_softBodies[i];
if (!psb->isActive())
{
counter += psb->m_nodes.size();
continue;
}
for (int j = 0; j < psb->m_nodes.size(); ++j)