From 3916ff16da70dc87a2a0e65cd44538e99df6dbba Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Sun, 19 Dec 2021 23:04:02 +0000 Subject: [PATCH] try to fix FOV --- src/bin/platformer/graphics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/platformer/graphics.rs b/src/bin/platformer/graphics.rs index 4d09602..c782d9a 100644 --- a/src/bin/platformer/graphics.rs +++ b/src/bin/platformer/graphics.rs @@ -174,7 +174,7 @@ impl Graphics { let screen_size = (320.0, 240.0); - let fov = 40.0f32; + let fov = 39.6f32 * screen_size.1 / screen_size.0; let proj_mat = Mat4::perspective_rh_gl (fov.to_radians (), screen_size.0 / screen_size.1, 0.125, 200.0);