I've got a trouble: suddenly flyCam and inputManager inside simpleInitApp() both became equal to NULL.
I don't understand what happened! They are ALWAYS NULL!
public void simpleInitApp() {
Box b = new Box(1, 1, 1);
System.out.println("inputManager = " + inputManager + "; flyCam = " + flyCam);
Geometry geom = new Geometry("Box", b);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat.setColor("Color", ColorRGBA.Blue);
geom.setMaterial(mat);
rootNode.attachChild(geom);
}
Output: inputManager = null; flyCam = null
All my examples (I did a lot of samples by jMonkey Book) throws NullPointer exceptions now (they worked before).
I tried to:
- reinstall jMonkey SDK and clean Windows registry
- reinstall video drivers
... nothing helps...
I don't understand what I actually had done... As far as I remember I just had written this:
private final InputListener flyCamListener = new ActionListener() {
@Override
public void onAction(String name, boolean isPressed, float tpf) {
boolean enabled = app.getFlyByCamera().isEnabled();
app.getFlyByCamera().setEnabled(!enabled);
}
};
and everything crushed.
===
jMonkey 3.0.10_x86, Java: 1.7.0_51, Windows 7 x86, OpenGL: 3.0.0, GLSL Ver: 1.30 - Intel Build 8.15.10.2342