Softbody bouncing questions
Posted: Tue Feb 24, 2015 4:10 pm
Hi,
Hi, i try to use the btsoftbody to simulate a rigid plastic part, but some things escapes to me.
my steps :
details:
Create softbody from a mesh :
When my soft body collide with another rigidbody, he bounce very far away .... the gravity and mass on soft body does not have an effect on it.
my other rigid body have restitution = 0.0.
What am I missing plz?
Hi, i try to use the btsoftbody to simulate a rigid plastic part, but some things escapes to me.
my steps :
details:
Code: Select all
myConfig = new btSoftBodyRigidBodyCollisionConfiguration();
myDispatcher = new btCollisionDispatcher(myConfig);
myBroadphase = new btDbvtBroadphase();
mySolver = new btMLCPSolver(new btSolveProjectedGaussSeidel());
myWorld = new btSoftRigidDynamicsWorld(myDispatcher, myBroadphase, mySolver, myConfig);
Create softbody from a mesh :
Code: Select all
btSoftBodyWorldInfo* L_world;
L_world->m_dispatcher = myDispatcher ;
L_world->m_broadphase = myBroadphase;
L_world->m_gravity.setValue(0.0f, 0.0f, -5.0f);
L_world->m_sparsesdf.Initialize();
L_world->m_sparsesdf.Reset();
btSoftBody* L_SoftBody = btSoftBodyHelpers::CreateFromTriMesh(*L_world, myBuildInfo->VerticeBuffer, myBuildInfo->IndiceBuffer, myBuildInfo->TriangleCount);
L_SoftBody->setTotalMass(50, true);
L_SoftBody->m_cfg.kVC = 300;
L_SoftBody->m_cfg.kCHR = 1.0f;
L_SoftBody->m_cfg.piterations = 200;
L_SoftBody->m_cfg.collisions = btSoftBody::fCollision::CL_RS + btSoftBody::fCollision::CL_SS;
L_SoftBody->randomizeConstraints();
L_SoftBody->generateClusters(30e7);
myWorld->addSoftBody(L_SoftBody);
my other rigid body have restitution = 0.0.
What am I missing plz?