Merge pull request #2447 from xhan0619/fix-cloth-friction

fix bug in deformable vs. deformable friction
This commit is contained in:
erwincoumans 2019-10-23 19:31:12 -07:00 committed by GitHub
commit e4ba8be582
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 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 = 0.1;
psb2->m_cfg.kDF = 0;
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

@ -435,7 +435,7 @@ btScalar btDeformableFaceNodeContactConstraint::solveConstraint()
m_total_tangent_dv -= impulse_tangent * m_contact->m_imf;
}
if (m_total_normal_dv.dot(m_contact->m_normal) < 0)
if (m_total_normal_dv.dot(m_contact->m_normal) > 0)
{
// separating in the normal direction
m_static = false;