zoom in camera
zoom in camera
Is it possible to make a zoom in a camera of irrlicht?? how??thank u very much
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) .
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) .