FOV horizontal, vertical

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Christi258
Posts: 62
Joined: Wed Feb 06, 2013 12:11 pm

FOV horizontal, vertical

Post 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?
Christi258
Posts: 62
Joined: Wed Feb 06, 2013 12:11 pm

Re: FOV horizontal, vertical

Post by Christi258 »

Well it seems to be the horizontal FOV, but how do I get the vertical FOV?
Hiroo
Posts: 10
Joined: Sun Dec 28, 2014 6:59 am

Re: FOV horizontal, vertical

Post 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.
iceguan
Posts: 10
Joined: Tue Mar 27, 2018 1:19 pm

Re: FOV horizontal, vertical

Post by iceguan »

I have just tested. setFov set Vertical FOV (Irrlicht 1.8.1), for sure
MartinVee
Posts: 139
Joined: Tue Aug 02, 2016 3:38 pm
Location: Québec, Canada

Re: FOV horizontal, vertical

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