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:
erwin.coumans@gmail.com
2013-11-04 01:12:52 +00:00
parent 439ab03940
commit 0536f986a6

View File

@@ -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);
}
}
}
}
//