From 081497a812fde6cd752e7f394b8a25edd452e4f5 Mon Sep 17 00:00:00 2001 From: Xuchen Han Date: Mon, 12 Aug 2019 12:04:31 -0700 Subject: [PATCH] reset dt to 1/240 for grasping demos --- examples/DeformableDemo/GraspDeformable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/DeformableDemo/GraspDeformable.cpp b/examples/DeformableDemo/GraspDeformable.cpp index c71929234..bee1472c1 100644 --- a/examples/DeformableDemo/GraspDeformable.cpp +++ b/examples/DeformableDemo/GraspDeformable.cpp @@ -126,7 +126,7 @@ public: } //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); } @@ -354,7 +354,7 @@ void GraspDeformable::initPhysics() getDeformableDynamicsWorld()->addSoftBody(psb); getDeformableDynamicsWorld()->addForce(psb, new btDeformableMassSpringForce()); 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