- add workaround for bugged TerrainGrid test data

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8692 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 2327e2303d
commit 4d9783ec81
  1. 3
      engine/src/test/jme3test/terrain/TerrainFractalGridTest.java
  2. 3
      engine/src/test/jme3test/terrain/TerrainQuadGridTest.java

@ -185,9 +185,6 @@ public class TerrainFractalGridTest extends SimpleApplication {
// Logger.getLogger(TerrainFractalGridTest.class.getName()).log(Level.SEVERE, null, ex);
// }
//workaround for bugged test j3o's
while(quad.getControl(RigidBodyControl.class)!=null){
quad.removeControl(RigidBodyControl.class);
}
quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0));
bulletAppState.getPhysicsSpace().add(quad);
}

@ -144,6 +144,9 @@ public class TerrainQuadGridTest extends SimpleApplication {
}
public void tileAttached(Vector3f cell, TerrainQuad quad) {
while(quad.getControl(RigidBodyControl.class)!=null){
quad.removeControl(RigidBodyControl.class);
}
quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0));
bulletAppState.getPhysicsSpace().add(quad);
}

Loading…
Cancel
Save