Page 1 of 1
zoom in camera
Posted: Tue Feb 08, 2005 11:05 am
by masfworld
Is it possible to make a zoom in a camera of irrlicht?? how??thank u very much
Posted: Thu Feb 10, 2005 8:42 am
by Guest
Simple: just call the camera's setFOV() function.
It takes one argument: the new FOV (Field Of View).
FOV is the angular width (in radians) of the camera - i.e. the angle at which the edges of the camera are located.
Standard FOV is PI/3.5 (according to the documentation - it may have been changed)
You can calculate the desired FOV by dividing the standard FOV by the zoom level. E.g. to get a 2x zoom, you'll want an FOV of PI/3.5/2.0.
You can call camera->SetFOV(PI/3.5/2.0) .