tweak fov, mouse sensitivity

This commit is contained in:
yuni 2024-04-08 03:15:45 +02:00
parent 0b0fd5664d
commit e95f019f3f
2 changed files with 9 additions and 5 deletions

View file

@ -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;
}

View file

@ -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,