Selaa lähdekoodia

Tiny cleanup with Bullet/SceneGraph sync.

enn0x 12 vuotta sitten
vanhempi
sitoutus
5249e8ba4b
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      panda/src/bullet/bulletRigidBodyNode.cxx

+ 3 - 2
panda/src/bullet/bulletRigidBodyNode.cxx

@@ -549,10 +549,11 @@ sync_b2p(PandaNode *node) {
   if (!_dirty) return;
   if (!_dirty) return;
 
 
   NodePath np = NodePath::any_path(node);
   NodePath np = NodePath::any_path(node);
-  CPT(TransformState) ts = btTrans_to_TransformState(_trans, _scale);
+  LPoint3 p = btVector3_to_LPoint3(_trans.getOrigin());
+  LQuaternion q = btQuat_to_LQuaternion(_trans.getRotation());
 
 
   _disabled = true;
   _disabled = true;
-  np.set_transform(NodePath(), ts);
+  np.set_pos_quat(NodePath(), p, q);
   _disabled = false;
   _disabled = false;
   _dirty = false;
   _dirty = false;
 }
 }