Mass values.
Posted: Thu Dec 20, 2018 6:21 pm
So, I have a ground plane that is colliding with convex hull shapes.
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:
I'm puzzled on why a mass 20 object would not lay still on a static plane. I could understand issues with a very light object laid on top of a very heavy one, but this?
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 );