Jump to content
  • Advertisement
Sign in to follow this  

[Bullet] SoftBody

This topic is 891 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, all.
I faced the trouble of deformation softbody. The thing is that after collision my object is cut/scattered into pieces.
    m_softBodyWorldInfo.air_density = (btScalar)0.2;
    m_softBodyWorldInfo.water_density	=	0;
    m_softBodyWorldInfo.water_offset		=	0;
    m_softBodyWorldInfo.water_normal		=	btVector3(0,0,0);
    m_softBodyWorldInfo.m_gravity = btVector3(0, 0, 0); //_world.world->getGravity();
    m_softBodyWorldInfo.m_dispatcher = _world.dispatcher;
    m_softBodyWorldInfo.m_broadphase = _world.broadPhase;
    m_softBodyWorldInfo.m_maxDisplacement = 0;
    staticSoftBoby = new StaticMeshToSoftBodyConverter(&m_softBodyWorldInfo);
    psb = staticSoftBoby->createSoftBodyFromTrimesh();
    btSoftBody::Material*	pm=psb->appendMaterial();
    pm->m_kLST				=	0.9;
    pm->m_kAST				=	0.1;
    pm->m_kVST				=	0.1;
    psb->m_cfg.piterations = 5;
    psb->m_cfg.kDF = 0.1;
    psb->m_cfg.kMT   =   0.25f;
    psb->m_cfg.kVC                =   0.5f;
    psb->m_cfg.collisions |= btSoftBody::fCollision::VF_SS;
    psb->m_cfg.kSRHR_CL = 0.1;
    psb->m_cfg.kSR_SPLT_CL = 0.1;

What am I doing wrong? Thanks.


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!