Custom mesh into TestFancyCar fails

Hi,

I have identical code with TestFancyCar except tuned paramters of car. Every thing runs fine with model provided in tutorial (Ferrari):

Here is the code:
[java]//Load model and get chassis Geometry
carNode = (Node)assetManager.loadModel(“Models/Ferrari/Car.scene”);
//carNode = (Node)assetManager.loadModel(“Models/felicia.obj”);
carNode.setShadowMode(ShadowMode.CastAndReceive);
Geometry chasis = findGeom(carNode, “Car”);
BoundingBox box = (BoundingBox) chasis.getModelBound();[/java]

Buy when I change it to my model or any other, even models which are bundled in jme3-test-data it throws NullPointerException on the last line in my code sample

[java] //Load model and get chassis Geometry
//carNode = (Node)assetManager.loadModel(“Models/Ferrari/Car.scene”);
carNode = (Node)assetManager.loadModel(“Models/felicia.obj”); //and I also tried to convert it into j3o, no change
carNode.setShadowMode(ShadowMode.CastAndReceive);
Geometry chasis = findGeom(carNode, “Car”);
BoundingBox box = (BoundingBox) chasis.getModelBound(); //this is line 351

[/java]

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main] java.lang.NullPointerException at mygame.Main.buildPlayer(Main.java:351) at mygame.Main.simpleInitApp(Main.java:144) at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225) 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)

I can’t really understand what is the problem. Model can be loaded without problem as you can see it is already loaded on the screenshot as rigidBodyControl (blue/green car on the left).
I really appreciate any help

You don’t have a geometry called “Car” inside the model so findGeom has failed.

You need to look inside the model (the SDK scene explorer works well for that) and see what the geometries in the model are called.

Thank you for your help. Taking look into Car.scene made everything clear.

Marked the topic as resolved for you.