bugfix: add Ghost support for soft bodies, so that they don't collide with ghosts...
authorErwin Coumans <blender@erwincoumans.com>
Fri, 3 Oct 2008 21:42:19 +0000 (21:42 +0000)
committerErwin Coumans <blender@erwincoumans.com>
Fri, 3 Oct 2008 21:42:19 +0000 (21:42 +0000)
extern/bullet2/src/BulletSoftBody/btSoftBody.cpp

index 0a27dbcedb5f8d17558a1c5d00eb271b5d195245..1604167b6efa7e674ab9d8c4ab1d51f7736fa7bc 100644 (file)
@@ -2439,6 +2439,10 @@ void                             btSoftBody::PSolve_RContacts(btSoftBody* psb,btScalar kst,btScalar ti)
        for(int i=0,ni=psb->m_rcontacts.size();i<ni;++i)
        {
                const RContact&         c=psb->m_rcontacts[i];
+               ///skip object that don't have collision response
+               if (!psb->getWorldInfo()->m_dispatcher->needsResponse(psb,c.m_cti.m_body))
+                       continue;
+
                const sCti&                     cti=c.m_cti;    
                const btVector3         va=cti.m_body->getVelocityInLocalPoint(c.m_c1)*dt;
                const btVector3         vb=c.m_node->m_x-c.m_node->m_q;