modified the code. explicit time stepping should only be implicit in velocity

This commit is contained in:
jingyuc
2021-08-13 16:34:34 -04:00
parent d6d8c3ceac
commit 9a17391a9a
7 changed files with 95 additions and 88 deletions

View File

@@ -157,7 +157,6 @@ void BasicTest::initPhysics()
m_broadphase = new btDbvtBroadphase();
btReducedSoftBodySolver* reducedSoftBodySolver = new btReducedSoftBodySolver();
reducedSoftBodySolver->setDamping(damping_alpha, damping_beta);
btVector3 gravity = btVector3(0, -10, 0);
reducedSoftBodySolver->setGravity(gravity);
@@ -183,7 +182,8 @@ void BasicTest::initPhysics()
// rsb->scale(btVector3(1, 1, 1)); //TODO: add back scale
rsb->translate(btVector3(0, 4, 0));
// rsb->setTotalMass(0.5);
rsb->setStiffnessScale(0.5);
rsb->setStiffnessScale(10);
rsb->setDamping(damping_alpha, damping_beta);
// set fixed nodes
rsb->setFixedNodes(0);