Fix a bug in softbody contact handling.
This commit is contained in:
@@ -1658,7 +1658,7 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm
|
|||||||
pm->m_kLST = 1.0;
|
pm->m_kLST = 1.0;
|
||||||
pm->m_flags -= btSoftBody::fMaterial::DebugDraw;
|
pm->m_flags -= btSoftBody::fMaterial::DebugDraw;
|
||||||
psb->generateBendingConstraints(2,pm);
|
psb->generateBendingConstraints(2,pm);
|
||||||
psb->m_cfg.piterations = 20;
|
psb->m_cfg.piterations = 50;
|
||||||
psb->m_cfg.kDF = 0.5;
|
psb->m_cfg.kDF = 0.5;
|
||||||
psb->randomizeConstraints();
|
psb->randomizeConstraints();
|
||||||
psb->rotate(btQuaternion(0.70711,0,0,0.70711));
|
psb->rotate(btQuaternion(0.70711,0,0,0.70711));
|
||||||
|
|||||||
@@ -3036,6 +3036,7 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti)
|
|||||||
btRigidBody* rigidCol;
|
btRigidBody* rigidCol;
|
||||||
btMultiBodyLinkCollider* multibodyLinkCol;
|
btMultiBodyLinkCollider* multibodyLinkCol;
|
||||||
btScalar* deltaV;
|
btScalar* deltaV;
|
||||||
|
btMultiBodyJacobianData jacobianData;
|
||||||
if (cti.m_colObj->getInternalType() == btCollisionObject::CO_RIGID_BODY)
|
if (cti.m_colObj->getInternalType() == btCollisionObject::CO_RIGID_BODY)
|
||||||
{
|
{
|
||||||
rigidCol = (btRigidBody*)btRigidBody::upcast(cti.m_colObj);
|
rigidCol = (btRigidBody*)btRigidBody::upcast(cti.m_colObj);
|
||||||
@@ -3047,7 +3048,6 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti)
|
|||||||
if (multibodyLinkCol)
|
if (multibodyLinkCol)
|
||||||
{
|
{
|
||||||
const int ndof = multibodyLinkCol->m_multiBody->getNumDofs() + 6;
|
const int ndof = multibodyLinkCol->m_multiBody->getNumDofs() + 6;
|
||||||
btMultiBodyJacobianData jacobianData;
|
|
||||||
jacobianData.m_jacobians.resize(ndof);
|
jacobianData.m_jacobians.resize(ndof);
|
||||||
jacobianData.m_deltaVelocitiesUnitImpulse.resize(ndof);
|
jacobianData.m_deltaVelocitiesUnitImpulse.resize(ndof);
|
||||||
btScalar* jac=&jacobianData.m_jacobians[0];
|
btScalar* jac=&jacobianData.m_jacobians[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user