Mass values.

Post Reply
bram
Posts: 51
Joined: Sun Nov 23, 2008 4:43 pm

Mass values.

Post 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?
Last edited by bram on Fri Dec 21, 2018 1:39 am, edited 1 time in total.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Mass values.

Post by Erwin Coumans »

Haven't seen this before. Can you create a simple repro case and file it in the issue tracker?
bram
Posts: 51
Joined: Sun Nov 23, 2008 4:43 pm

Re: Mass values.

Post by bram »

Yes, I'll try to repro it in the Benchmark Convex Demo.
bram
Posts: 51
Joined: Sun Nov 23, 2008 4:43 pm

Re: Mass values.

Post 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
Post Reply