From e95f019f3fc1e1e93f4cf2b290720d65d4c0ce18 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 8 Apr 2024 03:15:45 +0200 Subject: [PATCH] tweak fov, mouse sensitivity --- src/camera.rs | 4 ++-- src/settings.rs | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/camera.rs b/src/camera.rs index 283410f..34822a7 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -100,12 +100,12 @@ pub fn update_fov( { let fov: f32; if settings.hud_active && mouse_input.pressed(settings.key_zoom) { - fov = settings.zoom_fov_radians; + fov = settings.zoom_fov.to_radians(); if !settings.is_zooming { settings.is_zooming = true; } } else { - fov = (gforce.visual_effect * 20.0 + 55.0).to_radians(); + fov = (gforce.visual_effect * settings.fov_highspeed + settings.fov).to_radians(); if settings.is_zooming { settings.is_zooming = false; } diff --git a/src/settings.rs b/src/settings.rs index ca1f566..1bfd9a1 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -10,7 +10,9 @@ pub struct Settings { pub volume_sfx: u8, pub volume_music: u8, pub mouse_sensitivity: f32, - pub zoom_fov_radians: f32, + pub fov: f32, + pub fov_highspeed: f32, + pub zoom_fov: f32, pub zoom_sensitivity_factor: f32, pub font_size_hud: f32, pub font_size_conversations: f32, @@ -89,8 +91,10 @@ impl Default for Settings { mute_music: default_mute_music, volume_sfx: 100, volume_music: 100, - mouse_sensitivity: 0.5, - zoom_fov_radians: 20.0f32.to_radians(), + mouse_sensitivity: 0.7, + fov: 50.0, + fov_highspeed: 25.0, + zoom_fov: 20.0, zoom_sensitivity_factor: 0.25, font_size_hud: 32.0, font_size_conversations: 32.0,