Camera question

How can i change the FOV and the zoom of the camera?

I think you would want to use the Camera.setFrustum method:

setFrustum



void setFrustum(float near,

float far,

float left,

float right,

float top,

float bottom)



setFrustum defines the frustum planes of the camera. This frustum is defined by a six-sided box.



Parameters:

near - the frustum plane closest to the eye point.

far - the frustum plane furthest from the eye point.

left - the frustum plane left of the eye point.

right - the frustum plane right of the eye point.

top - the frustum plane above the eye point.

bottom - the frustum plane below the eye point.




So something like this:

cam.setFrustum(1.0f, 1000.0f, -0.55f, 0.55f, 0.4125f, -0.4125f);

cam.update();

might work.



Sorry, I can’t give you a more accurate answer since I’m trying to learn myself :slight_smile:



EDIT:

Found this in the wiki, it might be useful http://www.mojomonkeycoding.com/pmwiki/index.php/UsersGuide/ViewFrustum

The tighter the frustum, the more you zoom. That is, tighten the frustum and you make the viewable area smaller, thus zooming in on it. This is accomplished by setting the frustum as Per said.