Page 1 of 1

FOV horizontal, vertical

Posted: Wed May 21, 2014 4:25 pm
by Christi258
Hi everyone,
can you tell me which Field of view is returned by ICameraSceneNode::getFOV(), Horizontal or vertical or is that in irrlicht the same?

Re: FOV horizontal, vertical

Posted: Tue Jun 24, 2014 8:13 am
by Christi258
Well it seems to be the horizontal FOV, but how do I get the vertical FOV?

Re: FOV horizontal, vertical

Posted: Fri Jan 02, 2015 3:03 am
by Hiroo
Based on my experiments, the camera FOV appears to be diagonal. See my recent post about horizon in 2D. There is a code snipped in there to get the H and V component of camera FOV as well.

Re: FOV horizontal, vertical

Posted: Tue Mar 27, 2018 1:22 pm
by iceguan
I have just tested. setFov set Vertical FOV (Irrlicht 1.8.1), for sure

Re: FOV horizontal, vertical

Posted: Tue Mar 27, 2018 2:56 pm
by MartinVee
Congratulation, you've just been awarded the "Post Necromancer" achievement. :)

While we're at it... setFOV() and getFOV() respectively sets and return the vertical field of view (in radians). When you create a camera, it's initialized at "PI / 2.5". You can set the vertical field of view with setFOV(). This causes the view area's projection matrix to be recalculated using buildProjectionMatrixPerspectiveFovLH(), which automatically scales the horizontal fov based on the aspect ratio.