The Softbodies could be Triangle Meshes but also Tetrahedron Meshes.
Collision Reaction between these Objects is fine, but between Tetrahedon Meshes
no collision reaction occures. A Tetrahedron Softbody will just pass another Tetrahedon
Softbody but will collide with the btCollisionObject or a Tri-Softbody.
In the Softbody Demo Tetrahedron Meshes are also used with one TetMesh, thus
i am not sure if bullet may handle this.
Is this not possible with Bullet or did i something wrong?
BTW: Is there some information what the Cluster Collision means and what i have
to keep in mind if i will use CF_SS / CF_RS and not VF_SS?
Code: Select all
btSoftRigidDynamicsWorld * sworld = [ get world ]
btSoftBody * psb = createMesh(filename); // will create Mesh similar to btSoftbodyHelpers as Triangle or TetraMesh
btSoftBody::Material* pm=psb->appendMaterial();
pm->m_kLST = 0.05;
pm->m_flags -= btSoftBody::fMaterial::DebugDraw;
psb->generateBendingConstraints(2,pm);
psb->m_cfg.piterations = 2;
psb->m_cfg.citerations = 2;
psb->m_cfg.kDF = 0.5;
//psb->m_cfg.kDF = 10;
psb->m_cfg.collisions |= btSoftBody::fCollision::VF_SS;
// Cluster will not collide with Ground, but maybe this is my fault...
// psb->m_cfg.collisions = btSoftBody::fCollision::CL_SS+ btSoftBody::fCollision::CL_RS;
psb->randomizeConstraints();
psb->generateClusters(1);
if ( isTriMesh(m)) psb->setTotalMass(100,true);
if (isTetMesh(m)) psb->setVolumeMass(100);
sworld->addBody(psb);