From 0d7ff567e66a55f8a219caaf46614b613c58a6c4 Mon Sep 17 00:00:00 2001 From: Xuchen Han Date: Wed, 9 Oct 2019 00:38:13 -0700 Subject: [PATCH] bug fix in deformable predict motion --- src/BulletSoftBody/btDeformableBodySolver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BulletSoftBody/btDeformableBodySolver.cpp b/src/BulletSoftBody/btDeformableBodySolver.cpp index 197ef7221..1dba88698 100644 --- a/src/BulletSoftBody/btDeformableBodySolver.cpp +++ b/src/BulletSoftBody/btDeformableBodySolver.cpp @@ -336,14 +336,14 @@ bool btDeformableBodySolver::updateNodes() void btDeformableBodySolver::predictMotion(btScalar solverdt) { + // apply explicit forces to velocity + m_objective->applyExplicitForce(m_residual); for (int i = 0; i < m_softBodies.size(); ++i) { btSoftBody *psb = m_softBodies[i]; if (psb->isActive()) { - // apply explicit forces to velocity - m_objective->applyExplicitForce(m_residual); // predict motion for collision detection predictDeformableMotion(psb, solverdt); }