reset dt to 1/240 for grasping demos

This commit is contained in:
Xuchen Han
2019-08-12 12:04:31 -07:00
parent 991be52681
commit 081497a812

View File

@@ -126,7 +126,7 @@ public:
} }
//use a smaller internal timestep, there are stability issues //use a smaller internal timestep, there are stability issues
float internalTimeStep = 1. / 400.f; float internalTimeStep = 1. / 240.f;
m_dynamicsWorld->stepSimulation(deltaTime, 5, internalTimeStep); m_dynamicsWorld->stepSimulation(deltaTime, 5, internalTimeStep);
} }
@@ -354,7 +354,7 @@ void GraspDeformable::initPhysics()
getDeformableDynamicsWorld()->addSoftBody(psb); getDeformableDynamicsWorld()->addSoftBody(psb);
getDeformableDynamicsWorld()->addForce(psb, new btDeformableMassSpringForce()); getDeformableDynamicsWorld()->addForce(psb, new btDeformableMassSpringForce());
getDeformableDynamicsWorld()->addForce(psb, new btDeformableGravityForce(gravity)); getDeformableDynamicsWorld()->addForce(psb, new btDeformableGravityForce(gravity));
getDeformableDynamicsWorld()->addForce(psb, new btDeformableCorotatedForce(10,10)); getDeformableDynamicsWorld()->addForce(psb, new btDeformableCorotatedForce(5,5));
} }
// // create a piece of cloth // // create a piece of cloth