June 2013
Beginner
352 pages
9h 5m
English
The 3D model is ready for its journey into the 3D game world. Switch over to your BasicGame project in the jMonkeyEngine SDK again.
Main.java and name the class LoadModel.java. Remember to also refactor the first line of the main() method to: LoadModel app = new LoadModel ();
simpleInitApp() method with the following code snippet:public void simpleInitApp() {
Spatial mymodel = assetManager.loadModel(
"Textures/MyModel/mymodel.mesh.xml");
rootNode.attachChild(mymodel);
DirectionalLight sun = new DirectionalLight();
sun.setDirection((new Vector3f(-0.5f, -0.5f, -0.5f)));
sun.setColor(ColorRGBA.White);
rootNode.addLight(sun);
}Since the load() method returns both nodes and geometries, ...
Read now
Unlock full access