Whenever I try to load a JME file, I get the GZIP error. My code is
private void buildPlayer() {
Spatial model = null;
String mname ="Statue.jme";
try {
File bikeFile = new File(getDir() + "/model/" + mname);
System.out.println(getDir() + "/model/" + mname + " " + bikeFile.exists());
BinaryImporter importer = new BinaryImporter();
//model = ModelLoader.loadModel(bikeFile);
model = (Spatial)importer.load(bikeFile);
model.setModelBound(new BoundingBox());
model.updateModelBound();
//scale it to be MUCH smaller than it is originally
model.setLocalScale(.00025f);
} catch (IOException e) {
logger
.throwing(this.getClass().toString(), "buildPlayer()",
e);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//set the vehicles attributes (these numbers can be thought
//of as Unit/Second).
player = new Vehicle("Player Node", model);
player.setAcceleration(15);
player.setBraking(15);
player.setTurnSpeed(2.5f);
player.setWeight(25);
player.setMaxSpeed(25);
player.setMinSpeed(15);
player.setLocalTranslation(new Vector3f(100,0, 100));
scene.attachChild(player);
scene.updateGeometricState(0, true);
//we now store this initial value, because we are rotating the wheels the bounding box will
//change each frame.
player.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
}
However, I would appreciate it if someone could provide me with a method to load OBJ or 3DS files. Thank you, all help is appreciated! :P