2
\$\begingroup\$

I am making a roguelike in unity and i came across a problem where models are far from the center of camera rendered weird like upper right enemy. I have added screnshot there are also camera settings. I tried changing field of view but it did not work. Does anyone know which option causes that distortion?

enter image description here

\$\endgroup\$
5
  • 2
    \$\begingroup\$ What you've shown looks like the expected result with linear perspective. Because your window is so wide, relative to the distance of your camera from.your scene, the camera ends up seeing content at the far edges almost side-on, instead of top-down as it does for stuff in the middle. The usual fix is to reduce the field of view and move the camera back, so it sees the whole scene more top-down and can't peek at stuff sideways. You mentioned this didn't work for you though — can you explain what went wrong? \$\endgroup\$
    – DMGregory
    Mar 2, 2019 at 13:34
  • \$\begingroup\$ Thanks, I first moved the camera back as you mentioned then lowered fov around 25-30 and it worked. i did not knew current window resolution is important for fov. i will use max of 16x9 ratio (may use 18x9 later if i start to port game on mobile) so i can use higher fov while testing from now on. \$\endgroup\$
    – juba08
    Mar 2, 2019 at 14:07
  • 1
    \$\begingroup\$ Yeah, because Unity measures the field of view vertically, when you use a very wide screen you can end up with a much larger lateral fov than the vertical fov you set. If you found settings that worked for you, feel free to post them as an answer you can accept (after a short waiting period). \$\endgroup\$
    – DMGregory
    Mar 2, 2019 at 14:08
  • 1
    \$\begingroup\$ ... the other thing to do would be to set up your camera as orthographic/isometric \$\endgroup\$ Mar 3, 2019 at 6:36
  • \$\begingroup\$ Yes, distortion won't happen but there will be other problems. It is mostly in 2d games. \$\endgroup\$
    – juba08
    Mar 3, 2019 at 8:05

1 Answer 1

2
\$\begingroup\$

As DMGregory mentioned above, Distortion happened because my free Aspect screen is so wide and unity uses the vertical field of view. That's why horizontal fov is more than 100 in my case. I have also found a simple GitHub page to calculate horizontal fov:

http://themetalmuncher.github.io/fov-calc/

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .