Jmephysics problem


I've tried to integrate some physics in the flag rush Tutorial just for training. But I don't know why it doesn't work. May you help me? This is my code (Lesson 7, buildPlayer(), but I think there is everything in it you need to know…)

Node model = null;
       try {
           MaxToJme C1 = new MaxToJme();
           ByteArrayOutputStream BO = new ByteArrayOutputStream();
           URL maxFile = TestTerrain.class.getClassLoader().getResource("bike.3ds");
           C1.convert(new BufferedInputStream(maxFile.openStream()),BO);
           JmeBinaryReader jbr = new JmeBinaryReader();
           jbr.setProperty("bound", "box");
           model = jbr.loadBinaryFormat(new ByteArrayInputStream(BO.toByteArray()));
           //scale it to be MUCH smaller than it is originally
       } catch (IOException e) {
       //set the vehicles attributes (these numbers can be thought
       //of as Unit/Second).
       player = new Vehicle("Player Node", model);
       //...think you don't need this stuff...
       //...think you don't need this stuff...
       player.setLocalTranslation(new Vector3f(100,0, 100));
       scene.updateGeometricState(0, true);
       PhysicsObject plpo=new DynamicPhysicsObject(player, player.getWeight()); //line 266

player is extends Node...

This throws a ClassCastException:

java.lang.ClassCastException: com.jme.bounding.BoundingBox
at com.jmex.physics.PhysicsWorld.createNode(
at com.jmex.physics.PhysicsWorld.createPhysicalEntity(
at com.jmex.physics.DynamicPhysicsObject.<init>(
at Lesson7.buildPlayer(
at Lesson7.initGame(
at Source)
at Lesson7.main(

Thanks for help,

Err, well which jmephysics version do you use? (There even is no method PhysicsWorld.createNode any more)

I suppose you use the CVS version of jme? -> if yes you should use the CVS version of jmephysics, too.