adjust parameters

This commit is contained in:
Xuchen Han
2019-09-27 12:40:48 -07:00
parent cb46440e17
commit 977bdb4e0e
2 changed files with 4 additions and 4 deletions

View File

@@ -182,7 +182,7 @@ void DeformableContact::initPhysics()
psb2->setTotalMass(1);
psb2->m_cfg.kKHR = 1; // collision hardness with kinematic objects
psb2->m_cfg.kCHR = 1; // collision hardness with rigid body
psb2->m_cfg.kDF = .1;
psb2->m_cfg.kDF = 0.1;
psb2->m_cfg.collisions = btSoftBody::fCollision::SDF_RD;
psb2->m_cfg.collisions |= btSoftBody::fCollision::VF_DD;
psb->translate(btVector3(3.5,0,0));

View File

@@ -1306,8 +1306,8 @@ struct btSoftColliders
//
struct CollideVF_DD : btDbvt::ICollide
{
void Process(const btDbvntNode* lnode,
const btDbvntNode* lface)
void Process(const btDbvtNode* lnode,
const btDbvtNode* lface)
{
btSoftBody::Node* node = (btSoftBody::Node*)lnode->data;
btSoftBody::Face* face = (btSoftBody::Face*)lface->data;
@@ -1324,7 +1324,7 @@ struct btSoftColliders
btVector3 v1 = face->m_n[1]->m_x;
btVector3 v2 = face->m_n[2]->m_x;
btVector3 vc = (v0+v1+v2)/3.;
btScalar scale = 2;
btScalar scale = 1.5;
// enlarge the triangle to catch collision on the edge
btVector3 u0 = vc + (v0-vc)*scale;
btVector3 u1 = vc + (v1-vc)*scale;