Page 1 of 1

Is it possible to read the mass of a rigid body?

Posted: Sun Nov 17, 2019 4:10 pm
by s_kohan
This seems like it should be simple, but I don't see any way to do it in the API.

Re: Is it possible to read the mass of a rigid body?

Posted: Mon Nov 18, 2019 4:51 am
by drleviathan
The btRigidBody class does not store mass. Instead it has a data member called m_inverseMass. This because it never actually multiplies by mass - it always divides instead.

You can use btRigidBody::getInvMass() to get the inverse mass, and then you can invert that to get mass.