For the first function you could use:
cam.setParallelProjection(true);
cam.setLocation(Vector3f.UNIT_Y); //Top-Down View
//cam.setLocation(Vector3f.UNIT_Z); //Side-Scroller View
cam.lookAt(Vector3f.ZERO,Vector3f.UNIT_Y);
cam.setFrustumNear(0.75f);
flyCam.setEnabled(false);
Node characterNode=(Node) assetManager.loadModel("Models/Orc/Orc.j3o");
Quaternion quaternion=new Quaternion().fromAngleAxis(FastMath.PI/2,UNIT_Y);
characterNode.setLocalRotation(quaternion.inverse() ); //Top-Down View
//characterNode.setLocalRotation(quaternion); //Side-Scroller View
characterNode.setLocalScale(0.05f);
characterNode.setLocalTranslation(Vector3f.ZERO);
This is what you get for the Top-Down View:
http://i.imgur.com/Uzp1qez.jpg
And for the Side-Scroller View
http://i.imgur.com/axPACYq.jpg
You might also want to read the following topics:
1 Like