Skip to content

v0.9 Tutorial 26 Orthographic Camera

contriteobserver edited this page Jul 16, 2017 · 1 revision

The type of camera that is used by Rajawali as the default one is a perspective camera. With this type of camera parallel lines appear to converge in the horizon. An orthographic camera however will render objects uniformly without a sense of perspective.

Here are the two types of projections side by side. Perspective and Orthographic Projections

Setting up an orthographic camera is easy:

// -- Create an instance
OrthographicCamera camera = new OrthographicCamera();
// -- Set the zoom level
camera.setZoom(1); // -- this is the default
camera.setZoom(2);
// -- Set the look at coordinates
camera.setLookAt(1, 10, 3);

Check out this page to learn more about projection types in video games.

Clone this wiki locally