Hi guys!
Today i decided to add a PhysicsControl (with the SceneExplorer) to my terrain, to make a walking character. When i added that control, the TerrainLodControl starts to throw NullPointerExceptions:
[java]terreno.getChild(“terrain_Terreno”).getControl(TerrainLodControl.class).setCamera(cam);[/java]
I already tested the getChild() method and it works. When i try to get the lod control, it crashes.
The exception:
Set 20, 2014 7:51:19 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:121)
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:744)
Can somebody explain me what i did wrong?