浏览代码

CollisionShapeFactory.createCompoundShape now exclude geometies the are batched in a BatchNode.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10070 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om 12 年之前
父节点
当前提交
dada1c1d38
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      engine/src/bullet-common/com/jme3/bullet/util/CollisionShapeFactory.java

+ 1 - 1
engine/src/bullet-common/com/jme3/bullet/util/CollisionShapeFactory.java

@@ -102,7 +102,7 @@ public class CollisionShapeFactory {
                 shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()),
                         trans.getTranslation(),
                         trans.getRotation().toRotationMatrix());
-            } else if (spatial instanceof Geometry) {
+            } else if (spatial instanceof Geometry && !((Geometry)spatial).isBatched()) {
                 Boolean bool = spatial.getUserData(UserData.JME_PHYSICSIGNORE);
                 if (bool != null && bool.booleanValue()) {
                     continue; // go to the next child in the loop