浏览代码

fix traversals when the 'root' contains a transform

David Rose 19 年之前
父节点
当前提交
15fb1af7b2
共有 1 个文件被更改,包括 1 次插入1 次删除
  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());
     gbv->xform(rel_transform->get_mat());
     _local_bounds.push_back(gbv);
     _local_bounds.push_back(gbv);
   }
   }