Hi guys
It seems that i have an error in the init method. Can someone tell what is this error ?
I'm trying to get my model on the map. It seems that there is no error while loading. But can't find the model at all. Is there a way to set defualt model position or something plz ?
Here is the code, just tell me if i'm totally wrong or not
public class test extends TestIsland {
public static void main(String[] args)
{
test app = new test();
app.setConfigShowMode(ConfigShowMode.AlwaysShow);
app.start();
}
protected void simpleInitGame()
{
try{
// Point to a URL of the models
//URL model=TestIsland_K60.class.getClassLoader().getResource("C:/Documents and Settings/Whoami/Bureau/$_IPL/Workspace/K6O/models/tank/3dm-M1_Abrams/M1_Abrams.3DS");
//URL model = new File("C:/Documents and Settings/Whoami/Bureau/$_IPL/Workspace/K6O/models/new/jonesy.blend").toURL();
URL model = new File("C:/M1_Abrams.3DS").toURL();
// Create something to convert .obj format to .jme
FormatConverter converter=new MaxToJme();
// This byte array will hold the .jme files
ByteArrayOutputStream BO=new ByteArrayOutputStream();
// Use the format converter to convert .obj to .jme
converter.convert(model.openStream(), BO);
Node pers=(Node)BinaryImporter.getInstance().load(new ByteArrayInputStream(BO.toByteArray()));
// shrink the models
pers.setLocalScale(50);
pers.setModelBound(new BoundingSphere());
pers.updateModelBound();
// Put the models on the scene graph
rootNode.attachChild(pers);
}
catch (Exception e) {
// TODO: handle exception
}
}
}
Error :
06-d