couldn’t find a topic where this is already posted.
public class Pyr extends SimpleGame{
public static void main(String[] args) {
Pyr app = new Pyr();
app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);
app.start();
}
protected void simpleInitGame() {
//Box b = new Box("x",new Vector3f(0,0,0),new Vector3f(1,1,1)); //works
Pyramid b=new Pyramid("x",1,1);
CloneCreator cc=new CloneCreator(b);
cc.createCopy();
rootNode.attachChild(b);
}
}
java.lang.NullPointerException
at com.jme.math.Vector3f.set(Unknown Source)
at com.jme.math.Vector3f.<init>(Unknown Source)
at com.jme.scene.Geometry.putClone(Unknown Source)
at com.jme.scene.TriMesh.putClone(Unknown Source)
at com.jme.scene.CloneCreator.createCopy(Unknown Source)
at jme.Pyr.simpleInitGame(Pyr.java:27)
at com.jme.app.SimpleGame.initGame(Unknown Source)
at com.jme.app.BaseGame.start(Unknown Source)
at jme.Pyr.main(Pyr.java:20)
did I miss something?