mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 13:50:04 +00:00
Merge pull request #2447 from xhan0619/fix-cloth-friction
fix bug in deformable vs. deformable friction
This commit is contained in:
commit
e4ba8be582
@ -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));
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user