Page 1 of 1

Mass values.

Posted: Thu Dec 20, 2018 6:21 pm
by bram
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:

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 );
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?

Re: Mass values.

Posted: Fri Dec 21, 2018 1:34 am
by Erwin Coumans
Haven't seen this before. Can you create a simple repro case and file it in the issue tracker?

Re: Mass values.

Posted: Fri Dec 21, 2018 1:40 am
by bram
Yes, I'll try to repro it in the Benchmark Convex Demo.

Re: Mass values.

Posted: Fri Dec 21, 2018 1:56 am
by bram
It turns out that it's super easy to reproduce in BenchmarkDemo.cpp with a single line change.

Details here:

https://github.com/bulletphysics/bullet3/issues/2033