diff --git a/panda/src/bullet/bulletRigidBodyNode.cxx b/panda/src/bullet/bulletRigidBodyNode.cxx index 4328952f73..8ff2e909b3 100644 --- a/panda/src/bullet/bulletRigidBodyNode.cxx +++ b/panda/src/bullet/bulletRigidBodyNode.cxx @@ -226,8 +226,7 @@ transform_changed() { _sync = ts; btTransform trans = TransformState_to_btTrans(ts); - _rigid->setWorldTransform(trans); - _rigid->setInterpolationWorldTransform(trans); + _rigid->setCenterOfMassTransform(trans); if (ts->has_scale()) { LVecBase3f scale = ts->get_scale(); @@ -275,33 +274,6 @@ sync_b2p() { } } -//////////////////////////////////////////////////////////////////// -// Function: BulletRigidBodyNode::set_center_of_mass_pos -// Access: Published -// Description: -//////////////////////////////////////////////////////////////////// -void BulletRigidBodyNode:: -set_center_of_mass_pos(const LPoint3f &pos) { - - nassertv_always(!pos.is_nan()); - - btTransform trans = btTransform::getIdentity(); - trans.setOrigin(LVecBase3f_to_btVector3(pos)); - - _rigid->setCenterOfMassTransform(trans); -} - -//////////////////////////////////////////////////////////////////// -// Function: BulletRigidBodyNode::get_center_of_mass_pos -// Access: Published -// Description: -//////////////////////////////////////////////////////////////////// -LPoint3f BulletRigidBodyNode:: -get_center_of_mass_pos() const { - - return btVector3_to_LPoint3f(_rigid->getCenterOfMassPosition()); -} - //////////////////////////////////////////////////////////////////// // Function: BulletRigidBodyNode::get_linear_velocity // Access: Published diff --git a/panda/src/bullet/bulletRigidBodyNode.h b/panda/src/bullet/bulletRigidBodyNode.h index bf71b0255d..7e765cf0c5 100644 --- a/panda/src/bullet/bulletRigidBodyNode.h +++ b/panda/src/bullet/bulletRigidBodyNode.h @@ -37,9 +37,7 @@ PUBLISHED: INLINE ~BulletRigidBodyNode(); // Mass - LPoint3f get_center_of_mass_pos() const; float get_mass() const; - void set_center_of_mass_pos(const LPoint3f &pos); void set_mass(float mass); // Velocity