Browse Source

Fixed bugs with constraints on Linux.

enn0x 14 years ago
parent
commit
d65d78850e
2 changed files with 1 additions and 31 deletions
  1. 1 29
      panda/src/bullet/bulletRigidBodyNode.cxx
  2. 0 2
      panda/src/bullet/bulletRigidBodyNode.h

+ 1 - 29
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

+ 0 - 2
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