Blender + Vehicle

Hey guys!!!

I export my simple car Blender to Ogre, and i’m trying use the

I used the code and Ferrari model and it’s works very well, but when I try to use my model there are some errors:

Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
at mygame.Main.buildPlayer(
at mygame.Main.simpleInitApp(
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(

That’s your code. We can’t debug your code without seeing your code.

    //Load model and get chassis Geometry
    carNode = (Node)assetManager.loadModel("Models/classroom/car.scene");
    Geometry chasis = findGeom(carNode, "car");
    BoundingBox box = (BoundingBox) chasis.getModelBound(); (That's line 145)

Then chasis is simply null.
Hint: When you perform actions like that (or getControl() or or or) always do a simple check:

if (chasis == null)
    System.out.println("Error: Chassis is null, please fix the model classroom/car.scene");

That’s the way I do it all the time.

Open your model in JMP (SDK)'s SceneExplorer (right click and open in SE), then open the SceneExplorerWindow (it’s a sidebar, or found under Windows->SEW). There you can see the SceneGraph of your Model, I bet it’s not car but the name you gave it in blender (maybe car in your language)

Perfect… it’s works. Thanks!!!

1 Like