Scaling not working on Models

Sorry I was an idiot I fixed the code below


import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Level;

import com.jme.app.SimpleGame;
import com.jme.math.Vector3f;
import com.jme.scene.Node;
import com.jme.scene.model.XMLparser.JmeBinaryReader;
import com.jme.scene.shape.Box;
import com.jme.util.LoggingSystem;

public class ScaleTest extends SimpleGame {
    /**
     * Inits everything needed for this test.
     */
    protected void simpleInitGame() {
       display.setTitle("Scale Test");
       // Creates the box that makes out the floor.
       Box floorGraphics = new Box("Floor", new Vector3f(), 50, 1, 50);
       // We move it down 5 units, and away from the camera 10 units.
       floorGraphics.setLocalTranslation(new Vector3f(0, -5, 10));
             
       Node shipModel = new Node("ship model");
       try {
          JmeBinaryReader jbr = new JmeBinaryReader();
          jbr.setProperty("bound", "box");
          InputStream loaderInput=new File("spaceship.jme").toURI().toURL().openStream();
          shipModel = jbr.loadBinaryFormat(loaderInput);
       } catch (IOException ioe) {
          LoggingSystem.getLogger().log(Level.WARNING,
                "Could not load model: ");
       }
       // Shrink the model down
       shipModel.setLocalScale(.01f);
       // Update the geometric state of the ship
       shipModel.updateGeometricState(0, true);
             
       // Add the graphical representations to the rootNode. You could also get
       // references to them by calling PhysicsObject.getSpatial().
       rootNode.attachChild(floorGraphics);
       rootNode.attachChild(shipModel);
       rootNode.setForceView(true);
    }

    public static void main(String[] args) {
       ScaleTest app = new ScaleTest();
       app.setDialogBehaviour(ALWAYS_SHOW_PROPS_DIALOG, SimpleTest.class
             .getClassLoader().getResource(
                   "jmextest/data/images/jmephysics_logo.png"));
       app.start();
    }
 }



Get the model here:http://www.mekamedia.com/spaceship.jme

I’m going to look at it right now… but before I do, look at your main method. You are creating a SimpleTest object, not a ScaleTest. I’m guessing SimpleTest is another test you have somewhere? Any changes you make to scaleTest aren’t going to be shown, as you are starting up SimpleTest each time.

crap … I’m sorry. I’ve got too many demo things opened up here. Sorry bout that. IT works.