diff --git a/engine/src/bullet-common/com/jme3/bullet/util/CollisionShapeFactory.java b/engine/src/bullet-common/com/jme3/bullet/util/CollisionShapeFactory.java index 3f38e0e50..38551ea3f 100644 --- a/engine/src/bullet-common/com/jme3/bullet/util/CollisionShapeFactory.java +++ b/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 && !((Geometry)spatial).isBatched()) { + } else if (spatial instanceof Geometry) { Boolean bool = spatial.getUserData(UserData.JME_PHYSICSIGNORE); if (bool != null && bool.booleanValue()) { continue; // go to the next child in the loop diff --git a/engine/src/core/com/jme3/scene/BatchNode.java b/engine/src/core/com/jme3/scene/BatchNode.java index 4c9d47271..8af70b5f8 100644 --- a/engine/src/core/com/jme3/scene/BatchNode.java +++ b/engine/src/core/com/jme3/scene/BatchNode.java @@ -179,6 +179,7 @@ public class BatchNode extends Node implements Savable { //we set the batch geometries to ignore transforms to avoid transforms of parent nodes to be applied twice for (Batch batch : batches.getArray()) { batch.geometry.setIgnoreTransform(true); + batch.geometry.setUserData(UserData.JME_PHYSICSIGNORE, true); } }