Game Development Reference
In-Depth Information
3. We then set up some things in the initialize method. Rather than having a
completely top-down perspective, we give the camera a little tilt with
lookAtDirection and a unit vector. Then, we move the camera further away
from the ground with the camDistance variable. There is a reason we do this
and don't simply set the camera's location. By doing it this way, we can more eas-
ily get the location the camera is looking at. This will come in handy if we want
to add more advanced features:
private Vector3f camLocation = new Vector3f(0, 20, 0);
private Vector3f lookAtDirection = new Vector3f(0,
-0.8f, -0.2f);
Search WWH ::




Custom Search