reduced dofs and interpolated transform needs to be updated from the time_n states in the iteration

This commit is contained in:
jingyuc
2021-08-09 12:43:59 -04:00
parent 0acf18f246
commit a56ce358f3
4 changed files with 26 additions and 17 deletions

View File

@@ -106,8 +106,8 @@ public:
// // rsb->mapToReducedDofs();
// }
// float internalTimeStep = 1. / 60.f;
float internalTimeStep = 1e-3;
float internalTimeStep = 1. / 60.f;
// float internalTimeStep = 1e-3;
m_dynamicsWorld->stepSimulation(deltaTime, 1, internalTimeStep);
}
@@ -185,7 +185,7 @@ void BasicTest::initPhysics()
// rsb->scale(btVector3(1, 1, 1));
rsb->translate(btVector3(0, 4, 0)); //TODO: add back translate and scale
// rsb->setTotalMass(0.5);
rsb->setStiffnessScale(100);
rsb->setStiffnessScale(0.5);
rsb->setFixedNodes();
rsb->m_cfg.kKHR = 1; // collision hardness with kinematic objects
rsb->m_cfg.kCHR = 1; // collision hardness with rigid body