This works well, at low mass values. But if I create a larger shape, with a larger mass, let's say above the 20.0 value, then the fragments sink through the ground plane.
I understand that large mass ratios for joints are not stable.
But what if there is one static object, and one dynamic object, is a mass of 20 acceptable?
This is how I create my dynamic object:
Code: Select all
float mass = 2.0f * walls_volu[ nr ]; if ( mass < 0 ) mass=1; LOGI( "Fragment of volume %f has mass %f", walls_volu[ nr ], mass ); btVector3 localInertia; shape->calculateLocalInertia( mass, localInertia ); .... btRigidBody::btRigidBodyConstructionInfo rigidBodyCI( mass, 0, shape, localInertia ); rigidBodyCI.m_startWorldTransform.setOrigin( origin ); body = new btRigidBody( rigidBodyCI );