mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Enforce update of inertia tensor after shape or mass changes.
This commit is contained in:
parent
b110845659
commit
8c9bb7be1f
@ -104,6 +104,7 @@ set_mass(float mass) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_rigid->setMassProps(mass, inertia);
|
_rigid->setMassProps(mass, inertia);
|
||||||
|
_rigid->updateInertiaTensor();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -27,7 +27,13 @@ class BulletRigidBodyNode;
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Class : BulletSphericalConstraint
|
// 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 {
|
class EXPCL_PANDABULLET BulletSphericalConstraint : public BulletConstraint {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user