Browse Source

fix traversals when the 'root' contains a transform

David Rose 19 năm trước cách đây
mục cha
commit
15fb1af7b2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      panda/src/collide/collisionLevelState.cxx

+ 1 - 1
panda/src/collide/collisionLevelState.cxx

@@ -88,7 +88,7 @@ prepare_collider(const ColliderDef &def, const NodePath &root) {
     }
     */
 
-    CPT(TransformState) rel_transform = def._node_path.get_transform(root);
+    CPT(TransformState) rel_transform = def._node_path.get_transform(root.get_parent());
     gbv->xform(rel_transform->get_mat());
     _local_bounds.push_back(gbv);
   }