- fix scaling in terrain compound generation

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8738 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 197bba7fe8
commit 397c2acec8
  1. 2
      engine/src/bullet/com/jme3/bullet/util/CollisionShapeFactory.java
  2. 2
      engine/src/jbullet/com/jme3/bullet/util/CollisionShapeFactory.java

@ -96,7 +96,7 @@ public class CollisionShapeFactory {
} }
TerrainQuad terrain = (TerrainQuad) spatial; TerrainQuad terrain = (TerrainQuad) spatial;
Transform trans = getTransform(spatial, realRootNode); Transform trans = getTransform(spatial, realRootNode);
shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()), shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), trans.getScale()),
trans.getTranslation(), trans.getTranslation(),
trans.getRotation().toRotationMatrix()); trans.getRotation().toRotationMatrix());
} else if (spatial instanceof Node) { } else if (spatial instanceof Node) {

@ -96,7 +96,7 @@ public class CollisionShapeFactory {
} }
TerrainQuad terrain = (TerrainQuad) spatial; TerrainQuad terrain = (TerrainQuad) spatial;
Transform trans = getTransform(spatial, realRootNode); Transform trans = getTransform(spatial, realRootNode);
shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()), shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), trans.getScale()),
trans.getTranslation(), trans.getTranslation(),
trans.getRotation().toRotationMatrix()); trans.getRotation().toRotationMatrix());
} else if (spatial instanceof Node) { } else if (spatial instanceof Node) {

Loading…
Cancel
Save