- Home /
Camera FOV lower than 1?
Hi all, just wondering if there's an easy way to lower a camera's Field of View down to less than 1. I have an AC-130U gunship flying at 12,000 feet with a camera that needs to be able to read the expiration date on someone's lunch, but Unity insists (seemingly arbitrarily) that the FOV be greater than 1.
Thanks!
Answer by Bunny83 · Aug 10, 2018 at 12:30 AM
You can always set your own projection matrix. For reference my matrix crashcourse. The top, bottom, left and right values specify the field of view. If you want to specify the fov angle instead of the left / right / top / bottom edge, it's basically the inverse of the tangent of half your fov angle. For more information have a look at this page (about the second half). Keep in mind that you have to incoperate the aspect ratio into either the x (m00) or y(m11) factor.
Though keep in mind that very large scale factors (very small fov) may result in some number insability
Note that Unity has the static helper $$anonymous$$atrix4x4.Perspective to create a projection matrix based on a given fov angle, aspect ratio and near / far clipping plane. However i guess this methog may still apply the same limits. Though i've never tried it myself.
All right! Setting the camera's projection matrix using the $$anonymous$$atrix4x4.Perspective() constructor did indeed circumvent the field-of-view limit, but this all has me very interested in the nitty-gritty of how matrices work and their uses, so I am going to dive into your 'crash course.'
Thank you very much! It's generous people like you who make this community so great.