Merge pull request #448 from Dokthar/hoveringtank

fix NPE in hovering tank test, running with native bullet
cleanup_build_scripts
Kirill Vainer 9 years ago
commit 4d2542c1ed
  1. 1
      jme3-examples/src/main/java/jme3test/bullet/PhysicsHoverControl.java
  2. 2
      jme3-examples/src/main/java/jme3test/bullet/TestHoveringTank.java

@ -192,6 +192,7 @@ public class PhysicsHoverControl extends PhysicsVehicle implements PhysicsContro
}
public void setPhysicsSpace(PhysicsSpace space) {
createVehicle(space);
if (space == null) {
if (this.space != null) {
this.space.removeCollisionObject(this);

@ -147,13 +147,13 @@ public class TestHoveringTank extends SimpleApplication implements AnalogListene
spaceCraft.setLocalRotation(new Quaternion(new float[]{0, 0.01f, 0}));
hoverControl = new PhysicsHoverControl(colShape, 500);
hoverControl.setCollisionGroup(PhysicsCollisionObject.COLLISION_GROUP_02);
spaceCraft.addControl(hoverControl);
rootNode.attachChild(spaceCraft);
getPhysicsSpace().add(hoverControl);
hoverControl.setCollisionGroup(PhysicsCollisionObject.COLLISION_GROUP_02);
ChaseCamera chaseCam = new ChaseCamera(cam, inputManager);
spaceCraft.addControl(chaseCam);

Loading…
Cancel
Save