finish deformable sleeping and add option for drag

This commit is contained in:
Xuchen Han
2019-10-10 13:12:40 -07:00
parent 0d7ff567e6
commit 25a566c378
7 changed files with 43 additions and 0 deletions

View File

@@ -376,6 +376,7 @@ void btDeformableBodySolver::predictDeformableMotion(btSoftBody* psb, btScalar d
for (i = 0, ni = psb->m_nodes.size(); i < ni; ++i)
{
btSoftBody::Node& n = psb->m_nodes[i];
n.m_v *= (1 - psb->m_cfg.drag);
n.m_q = n.m_x + n.m_v * dt;
}
/* Bounds */