Need car, not box

Hey all



im using the ThirdPersonTestController example, but I want to replace the box with a textured car (so i can move the car around, not the box etc)



The car is a wavefront obj, and I have working code which will load the car etc. I tried to insert the code instead of the box, but for some reason it wont work. I havent been using jme for all that long, so any help as to why this is happening would be great. How can I get the car to load instead of the box?



Please ask if you need me to post code etc…



thanks

mtm

can we get the exception or some source code?

okay, the source code is below. I feel the problem may be due to a bounding box which was surrounding the original box, but when I load the car instead, it is not there, thus causing a runtime exception. (yep, the exception is at runtime)




protected void simpleUpdate() {
        chaser.update(tpf);
        float camMinHeight = page.getHeight(cam.getLocation()) + 2f;
        if (!Float.isInfinite(camMinHeight) && !Float.isNaN(camMinHeight)
                && cam.getLocation().y <= camMinHeight) {
            cam.getLocation().y = camMinHeight;
            cam.update();
        }

        float characterMinHeight = page.getHeight(m_character
                .getLocalTranslation())+((BoundingBox)m_character.getWorldBound()).yExtent;
        if (!Float.isInfinite(characterMinHeight) && !Float.isNaN(characterMinHeight)) {
            m_character.getLocalTranslation().y = characterMinHeight;
        }

} // end simple update


   

   public void setupChar() {
   // a fezza model character
   
   ObjToJme converter = new ObjToJme(); // objtojme is a jme converter, which allows the interpretation of the obj filetype into jme
   
   try {
            URL objFile=Gamecore.class.getClassLoader().getResource("cars/model/f.obj");
            converter.setProperty("mtllib",objFile);
            ByteArrayOutputStream BO=new ByteArrayOutputStream();   
         // convert obj into jme    
            converter.convert(objFile.openStream(),BO);
            //set paths for the model files
         JmeBinaryReader jbr=new JmeBinaryReader();
         jbr.setProperty("texclasspath", "cars/model/");
         
         // assign children to the root node, to display on the screen.
            m_character=jbr.loadBinaryFormat(new ByteArrayInputStream(BO.toByteArray()));
            m_character.setLocalScale(.1f);
            rootNode.attachChild(m_character);
         
           TextureState ts = display.getRenderer().createTextureState();
         ts.setEnabled(true);
         ts.setTexture(TextureManager.loadTexture(JmeObj.class.getClassLoader().getResource(
            "jmetest/data/images/fskin.jpg"),
            Texture.MM_LINEAR,
            Texture.FM_LINEAR));
         m_character.setRenderState(ts);
   
   
      }
         
         
      catch (IOException e) {
            e.printStackTrace();
        }
   
   
   } // end setupChar



Im going to edit simpleupdate so that it doesnt contain any references to bounding box. If i comment out the whole of the simpleupdate code, the model loads on a terrain, but its functionality is severely affected in terms of visible terrain

thanks for any help



Edit :: I didnt add the exception, as im still working on a solution, so ill be getting different ones everytime - hope that makes sense?!