I am working with softbodies, and I'm trying to understand the different parameters. So far I have succesfully created a softbody from a triMesh. It fall to a ground plane, but when it hits it, it 'deflates', as if it were a punctured ball. So I want to know how I can make it more solid but still rubber like so it bounces?
This is my code, but I don't understand the parameters as there is really no documentation.
Code: Select all
btSoftBody::Material* pm = mOgreBullet->ptrSoftBody->appendMaterial();
mOgreBullet->ptrSoftBody->m_materials[0]->m_kLST = 1.0; // what is this?
mOgreBullet->ptrSoftBody->m_materials[0]->m_kAST = 1.0; // what is this?
mOgreBullet->ptrSoftBody->m_materials[0]->m_kVST = 1.0; // what is this?
mOgreBullet->ptrSoftBody->m_cfg.kDF = 0.5; // what is this?
mOgreBullet->ptrSoftBody->scale(btVector3(0.1,0.1,0.1));
mOgreBullet->ptrSoftBody->setTotalMass(10,true);
mOgreBullet->ptrSoftBody->setPose(true,true); // what is this?
//mOgreBullet->ptrSoftBody->setPose(false,true);// what is this?
//mOgreBullet->ptrSoftBody->generateBendingConstraints(1, pm); // what is this?
mOgreBullet->ptrSoftBody->m_cfg.piterations = 2; // what is this?
mOgreBullet->ptrSoftBody->randomizeConstraints(); // what is this?
mOgreBullet->getDynamicsWorld()->addSoftBody(mOgreBullet->ptrSoftBody);
Thanks.