Hello everybody,
I am trying to make a very simple application (more like a test) using jmephysics(0.4) and jme(0.9) and lwjql 0.98.
In my sample app I am trying to create a terrain and have an object that falls on the terrain.
Since I am new to jme I do not kknow exactly how to do it but I guess it is sth like that:
package jme2;
import com.jme.app.SimpleGame;
import com.jme.scene.shape.Box;
import com.jme.math.Vector3f;
import com.jmex.physics.*;
import com.jme.math.Quaternion;
public class Main extends SimpleGame{
public static void main (String[] args)
{
Main app = new Main();
app.start();
}
protected void simpleInitGame() {
PhysicsWorld.create();
Box b = new Box("MYBOX", new Vector3f(10,10,10),100,100,100);
DynamicPhysicsObject s = new DynamicPhysicsObject(b, 45);
PhysicsWorld.getInstance().addObject(s);
s.syncWithGraphical(false);
PhysicsWorld.getInstance().update(50);
rootNode.attachChild(b);
Box c = new Box ("Terrain", new Vector3f (-100, -5, -100), 0,0, 0);
StaticPhysicsObject myTerrain = new StaticPhysicsObject(c);
PhysicsWorld.getInstance().addObject(myTerrain);
myTerrain.syncWithGraphical();
rootNode.attachChild(c);
/*
Quaternion q = new Quaternion (1,1,1,1);
Quaternion p = q.set(q);*/
rootNode.updateWorldBound();
}
}
I seem to be getting this error using NetBeans 4.1 and java 1.4.2_04
the same thing happens if I use java 1.5 so I do not think its a java problem.
Thank you very much