diff --git a/engine/src/bullet/com/jme3/bullet/util/CollisionShapeFactory.java b/engine/src/bullet/com/jme3/bullet/util/CollisionShapeFactory.java index b56a355bf..76b7ef12c 100644 --- a/engine/src/bullet/com/jme3/bullet/util/CollisionShapeFactory.java +++ b/engine/src/bullet/com/jme3/bullet/util/CollisionShapeFactory.java @@ -96,7 +96,7 @@ public class CollisionShapeFactory { } TerrainQuad terrain = (TerrainQuad) spatial; Transform trans = getTransform(spatial, realRootNode); - shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()), + shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), trans.getScale()), trans.getTranslation(), trans.getRotation().toRotationMatrix()); } else if (spatial instanceof Node) { diff --git a/engine/src/jbullet/com/jme3/bullet/util/CollisionShapeFactory.java b/engine/src/jbullet/com/jme3/bullet/util/CollisionShapeFactory.java index b56a355bf..76b7ef12c 100644 --- a/engine/src/jbullet/com/jme3/bullet/util/CollisionShapeFactory.java +++ b/engine/src/jbullet/com/jme3/bullet/util/CollisionShapeFactory.java @@ -96,7 +96,7 @@ public class CollisionShapeFactory { } TerrainQuad terrain = (TerrainQuad) spatial; Transform trans = getTransform(spatial, realRootNode); - shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()), + shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), trans.getScale()), trans.getTranslation(), trans.getRotation().toRotationMatrix()); } else if (spatial instanceof Node) {