-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLTFLoader: camera xfov calculation is wrong #13642
Comments
After more testing the right formula is:
|
Thanks for the report! Looking at this now, I'm not sure why we convert to |
Hah, that explains what I'm seeing ... double (or triple) checked that the xfov got calculated correctly, but scene still didn't look quite right :) Should be very easy fix then. |
Opened #13646 |
Description of the problem
xfov is not calculated correctly. As fov is an angle you can not just multiply aspect ratio, but should do something like
xfov = atan(tan(yfov) / aspectratio)
(see https://www.gamedev.net/forums/topic/203238-perspective---x---fov/?tab=comments#comment-2294951)This conversion is done here: https://github.com/mrdoob/three.js/blob/dev/examples/js/loaders/GLTFLoader.js#L2356
Three.js version
Browser
OS
The text was updated successfully, but these errors were encountered: