I'm trying to present cloth. What I have done is:
1, Use btSoftBodyHelpers::CreateFromTriMesh to create a softbody and add it to the SoftRigidDynamicsWorld.
2, Fix the first two nodes by setMass(index, 0).
3, On every frame, updating the fixed nodes' position when moving.
Code: Select all
m_SoftBody->m_nodes[index].m_x = btVector3(newPos.x, newPos.y, newPos.z);For now, it works. But the cloth is extended like some kind of elasticity. I have tried the parameters in m_cfg, but none could remove it. Any idea?