Self-collision of Softbodies - Cluster usage

tetraCutter
Posts: 5
Joined: Fri Mar 19, 2010 5:29 pm

Self-collision of Softbodies - Cluster usage

Post by tetraCutter »

Hi,

I'm currently trying to avoid self-collisions of Softbodies. I read that the use of Clusters will help. But even when I use generateClusters(0) in my code, the Softbody still doesn't collide with itself.

This is my code:

Code: Select all

tetra = createFromTetGen(pdemo, "cube.1.ele",
		"cube.1.face", "cube.1.node");
pdemo->getSoftDynamicsWorld()->addSoftBody(tetra);
tetra->m_cfg.piterations = 1;
tetra->generateClusters(0);
tetra->getCollisionShape()->setMargin(0.01);
tetra->m_cfg.collisions = btSoftBody::fCollision::CL_SS
		+ btSoftBody::fCollision::CL_RS
		+ btSoftBody::fCollision::CL_SELF
;
tetra->m_materials[0]->m_kLST = 0.9;
tetra->m_cfg.kDF = 0.5;