zoom in camera

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
masfworld
Posts: 9
Joined: Thu Sep 30, 2004 10:29 pm

zoom in camera

Post by masfworld »

Is it possible to make a zoom in a camera of irrlicht?? how??thank u very much
Guest

Post 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) .
Post Reply