@pspeed this is the correct stack trace:
[java]ene 22, 2014 7:53:38 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at mygame.Main.simpleInitApp(Main.java:113)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:722)[/java]
[java]public void simpleInitApp() {
// You must add a light to make the model visible
DirectionalLight sun = new DirectionalLight();
sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));
rootNode.addLight(sun);
Spatial scene = assetManager.loadModel("Scenes/newScene.j3o");
rootNode.attachChild(scene);
final int SHADOWMAP_SIZE=1024;
DirectionalLightShadowRenderer dlsr = new DirectionalLightShadowRenderer(assetManager, SHADOWMAP_SIZE, 3);
dlsr.setLight(sun);
viewPort.addProcessor(dlsr);
dlsf = new DirectionalLightShadowFilter(assetManager, 1024, 3);
dlsf.setLight(sun);
dlsf.setEnabled(true);
FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
fpp.addFilter(dlsf);
viewPort.addProcessor(fpp);
player = (Node) assetManager.loadModel("Models/Sinbad/Sinbad.mesh.j3o");
//I downloaded this model from the official Ogre site (a Blender file), then I
//converted it using the latest exporter.
player.setShadowMode(RenderQueue.ShadowMode.Cast);
scene.setShadowMode(RenderQueue.ShadowMode.Receive);
Node playerCamContainer = new Node();
rootNode.attachChild(playerCamContainer);
rootNode.attachChild(player);
player.setLocalTranslation(10, 10, 10);
// Disable the default flyby cam
flyCam.setEnabled(false);
//create the camera Node
//camNode = new CameraNode("Camera Node", cam);
//This mode means that camera copies the movements of the target:
//camNode.setControlDir(ControlDirection.SpatialToCamera);
//Attach the camNode to the target:
//player.attachChild(camNode);
//.getParent().attachChild(camNode);
//Move camNode, e.g. behind and above the target:
ChaseCamera chaseCam = new ChaseCamera(cam, player, inputManager);
//Rotate the camNode to look at the target:
//camNode.lookAt(player.getLocalTranslation(), Vector3f.UNIT_Y);
bulletAppState = new BulletAppState();
stateManager.attach(bulletAppState);
playerControl = new BetterCharacterControl(1,1.8f,50);
// Attach physical properties to model and PhysicsSpace
player.addControl(playerControl);
bulletAppState.getPhysicsSpace().add(playerControl);
bulletAppState.getPhysicsSpace().add(rootNode.getChild(“terrain-newScene”).getControl(RigidBodyControl.class));
control = player.getChild(0).getControl(AnimControl.class);
control.addListener(this); // <<--This is the line firing the exception
channel = control.createChannel();
channel.setAnim("my_animation");
initKeys();
}[/java]