BGE bug #18883: Softbodies being hit by ghost objects. Added a one liner fix in Bullet. I will also report the fix to Erwin so that it can be added to next Bullet version.
This commit is contained in:
parent
35c8226d28
commit
d8d5bb6b9a
@ -2780,8 +2780,9 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti)
|
||||
{
|
||||
const RContact& c = psb->m_rcontacts[i];
|
||||
const sCti& cti = c.m_cti;
|
||||
btRigidBody* tmpRigid = btRigidBody::upcast(cti.m_colObj);
|
||||
|
||||
if (cti.m_colObj->hasContactResponse()) {
|
||||
btRigidBody* tmpRigid = 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;
|
||||
@ -2797,6 +2798,7 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti)
|
||||
tmpRigid->applyImpulse(impulse,c.m_c1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user