apply patch: soft bodies should not collide with ghost objects.
Thanks to Sergej Reich for the patch, fixes Issue 757
This commit is contained in:
@@ -3027,8 +3027,9 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti)
|
||||
{
|
||||
const RContact& c = psb->m_rcontacts[i];
|
||||
const sCti& cti = c.m_cti;
|
||||
if (cti.m_colObj->hasContactResponse())
|
||||
{
|
||||
btRigidBody* tmpRigid = (btRigidBody*)btRigidBody::upcast(cti.m_colObj);
|
||||
|
||||
const btVector3 va = tmpRigid ? tmpRigid->getVelocityInLocalPoint(c.m_c1)*dt : btVector3(0,0,0);
|
||||
const btVector3 vb = c.m_node->m_x-c.m_node->m_q;
|
||||
const btVector3 vr = vb-va;
|
||||
@@ -3044,6 +3045,7 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti)
|
||||
tmpRigid->applyImpulse(impulse,c.m_c1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user