friction fixes

This commit is contained in:
Xuchen Han
2019-08-09 16:02:44 -07:00
parent 5b8df6a708
commit fb6612c0be
5 changed files with 45 additions and 15 deletions

View File

@@ -38,6 +38,7 @@ void btDeformableBodySolver::solveConstraints(float solverdt)
setConstraints();
m_objective->computeResidual(solverdt, m_residual);
m_objective->projectFriction(m_residual);
computeStep(m_dv, m_residual);
updateVelocity();
}
@@ -75,7 +76,7 @@ void btDeformableBodySolver::setConstraints()
{
BT_PROFILE("setConstraint");
m_objective->setConstraints();
for (int i = 0; i < 10; ++i)
for (int i = 0; i < 1; ++i)
{
m_objective->projection.update();
m_objective->enforceConstraint(m_dv);