Browse Source

Enforce update of inertia tensor after shape or mass changes.

enn0x 14 years ago
parent
commit
8c9bb7be1f

+ 1 - 0
panda/src/bullet/bulletRigidBodyNode.cxx

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

+ 7 - 1
panda/src/bullet/bulletSphericalConstraint.h

@@ -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 {