Grasp soft body with rigid fingers.

This commit is contained in:
yunfeibai
2016-11-01 15:46:09 -07:00
parent f01389ded2
commit 9d54f0cf8d
5 changed files with 518 additions and 17 deletions

View File

@@ -1643,14 +1643,14 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm
pm->m_kLST = 1.0;
pm->m_flags -= btSoftBody::fMaterial::DebugDraw;
psb->generateBendingConstraints(2,pm);
psb->m_cfg.piterations = 2;
psb->m_cfg.piterations = 15;
psb->m_cfg.kDF = 0.5;
psb->randomizeConstraints();
psb->rotate(btQuaternion(0.70711,0,0,0.70711));
psb->translate(btVector3(0,0,3.0));
psb->translate(btVector3(0,0,1.0));
psb->scale(btVector3(0.1,0.1,0.1));
psb->setTotalMass(1,true);
psb->getCollisionShape()->setMargin(0.01);
psb->setTotalMass(0.1,true);
psb->getCollisionShape()->setMargin(0.02);
m_data->m_dynamicsWorld->addSoftBody(psb);
#endif
@@ -3772,4 +3772,4 @@ void PhysicsServerCommandProcessor::createDefaultRobotAssets()
}
}
}
}