I am trying to set up an ortho view with 0, 0 in the top left using this code:
GameStateManager.create();
TankGameState currentState = new TankGameState(display);
currentState.setActive(true);
GameStateManager.getInstance().attachChild(currentState);
cam = display.getRenderer().createCamera(display.getWidth(), display.getHeight());
cam.setParallelProjection( true );
cam.setFrustum( -10, 10, 0, 800, 0, 600);
// cam.setViewPort(0, 1, 1, 0);
// Vector3f loc = new Vector3f( 0.0f, 0.0f, 1.0f );
// Vector3f left = new Vector3f( -1.0f, 0.0f, 0.0f );
// Vector3f up = new Vector3f( 0.0f, 1.0f, 0.0f );
// Vector3f dir = new Vector3f( 0.0f, 0f, -1.0f );
// /** Move our camera to a correct place and orientation. */
// cam.setFrame( loc, left, up, dir );
/** Signal that we've changed our camera's location/frustum. */
cam.update();
/** Assign the camera to this renderer. */
display.getRenderer().setCamera( cam );
I have tried to do it with setFrustrum(), setViewPort() and set the camera attributes. None of them change anything. 0, 0 remains at the bottom left of the screen. I tried to search to see if anyone had a similar problem, but couldn’t find anything. Can anyone tell me what I am missing?