Enforce update of inertia tensor after shape or mass changes.

This commit is contained in:
enn0x 2011-08-22 22:03:50 +00:00
parent b110845659
commit 8c9bb7be1f
2 changed files with 8 additions and 1 deletions

View File

@ -104,6 +104,7 @@ set_mass(float mass) {
}
_rigid->setMassProps(mass, inertia);
_rigid->updateInertiaTensor();
}
////////////////////////////////////////////////////////////////////

View File

@ -27,7 +27,13 @@ class BulletRigidBodyNode;
////////////////////////////////////////////////////////////////////
// Class : BulletSphericalConstraint
// Description :
// Description : A constraint between two rigid bodies, each with a
// pivot point. The pivot points are described in the
// body's local space. The constraint limits movement
// of the two rigid bodies in such a way that the
// pivot points match in global space. The spherical
// constraint can be seen as a "ball and socket"
// joint.
////////////////////////////////////////////////////////////////////
class EXPCL_PANDABULLET BulletSphericalConstraint : public BulletConstraint {