forked from Rajawali/Rajawali
-
Notifications
You must be signed in to change notification settings - Fork 0
Tutorial 26 Orthographic Camera
MasDennis edited this page Apr 10, 2013
·
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.
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.