restore behaviors of btSoftBody

This commit is contained in:
Xuchen Han
2019-08-06 10:52:19 -07:00
parent 6a599bde87
commit e5231b5cc5
9 changed files with 221 additions and 113 deletions

View File

@@ -342,6 +342,7 @@ void Pinch::initPhysics()
psb->m_cfg.kKHR = 1; // collision hardness with kinematic objects
psb->m_cfg.kCHR = 1; // collision hardness with rigid body
psb->m_cfg.kDF = 2;
psb->m_cfg.collisions = btSoftBody::fCollision::SDF_RD;
getDeformableDynamicsWorld()->addSoftBody(psb);
getDeformableDynamicsWorld()->addForce(psb, new btDeformableMassSpringForce());
getDeformableDynamicsWorld()->addForce(psb, new btDeformableGravityForce(gravity));