This MS3d model is wrecking my head

Hey all,



I have this stupid problem with an MS3d model with an animation, i have an original one made which moves grand but it didnt walk as well as i had hoped, so i created a new one, the old loaded without a problem, but the new model does not load and give me some sort of nullpointer exception, and the crazy thing about is, that i use the exact same good as for loading the old model, this is the error message i get, i cant make any sense of it, hopefully yas might be able to undersatnd whats going on, thanx for ur help  :smiley:






INFO: Child (hud) attached to this node (mainGameRootNode)
java.lang.NullPointerException
   at com.jme.math.Quaternion.slerp(Unknown Source)
   at com.jmex.model.animation.JointController.createJointTransforms(Unknown Source)
   at com.jmex.model.animation.JointController.update(Unknown Source)
   at com.jme.scene.Spatial.updateWorldData(Unknown Source)
   at com.jme.scene.Node.updateWorldData(Unknown Source)
   at com.jme.scene.Spatial.updateGeometricState(Unknown Source)
   at com.jme.scene.Node.updateWorldData(Unknown Source)
   at com.jme.scene.Spatial.updateGeometricState(Unknown Source)
   at game.GameTest.update(GameTest.java:415)
   at com.jme.app.BaseGame.start(Unknown Source)
   at game.GameTest.main(GameTest.java:199)
25-May-2007 20:56:58 c

:? :?

Im sorry about annoying people about this, but i have to have this done by tomorrow. basically whats going on is, when i load in the original bot it walks and works fine, but when i load in the new bot it should walk with its hand up with the gun pointing at the player, but i get the above error… can anyone help, i would really appreciate it, below is the code i use for it





public  Node loadModel() {
      
         Node node = new Node("fighter");
         
                      MilkToJme milktojme = new MilkToJme();
         ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
         
//          File Path for the model (dump file in toplevel of classpath)
         URL url = Bot.class.getClassLoader().getResource("character/zombie/newbot.MS3D");
      
         try {
            milktojme.convert(url.openStream(), bytearrayoutputstream
         } catch(Exception err)  {
             System.out.println("Could not open Model file: "+err);
         }
         try {
         
            
             BinaryImporter binaryImporter = new BinaryImporter();
            
             URL TEXdir=Bot.class.getClassLoader().getResource(
                "character/zombie/");
               TextureKey.setOverridingLocation(TEXdir);
             node = (Node)BinaryImporter.getInstance().load(new ByteArrayInputStream(bytearrayoutputstream.toByteArray()));
         } catch(Exception err)  {
             System.out.println("Error loading MS3d model:"+err);
         }
         
         
        
          node.setModelBound(new BoundingSphere());
         node.updateModelBound();
         node.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
         node.updateRenderState();
         
         
         ((JointController) node.getController(0)).setTimes(0,1    );
         ((JointController) node.getController(0)).setRepeatType(Controller.RT_WRAP);
         ((JointController) node.getController(0)).setActive(true);
         node.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
        
         
        
         
         GameTest.returnRootNode().updateGeometricState(1.0f, true);
         return node;
        
        
   }




Does anyone know why this happens? or how to fix it, I run the animation using the JointController class, and i really need to get this new model into my game by later today

It would be really helpful if you pointed to the line of code (in your program) that breaks with that exception.

INFO: Child (hud) attached to this node (mainGameRootNode)



For instance, where is this part?

Has this been solved with private messages or in some other way? I have the same problem and this thread unfortunately seems to be dead…  :frowning: