i am trying to figure out how i would get the FOV from the projection Matrix from camera. but i cannot really get the right informations.
in the end i need to change the projectionMatrix so that it represents a bigger FOV.
this should represent a camera with a 45° FOV. what do i need to change or calculate so that it represents a for example 50° FOV?
i tried to use this logic here but it seems that the babylon matrix is not like openGL
Any help would be awesome!
(i want to do this, because i am feeding the matrix into loaders.gl to receive tiling information from the actual camera perspective. but my virtual camera needs a little bigger fov)
The best way is to look at how the matrix is computed:
The b variable is 1/tan(fov*0.5) (because by default isVerticalFovFixed==true), so by reading the 5th value of the matrix, you could easily deduce the fov value.