From 860d7f8d4b4a04e5c0d871e28c5782fdc3799d59 Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 10 Apr 2024 22:04:07 +0200 Subject: [PATCH] clamp fov change with g force --- src/camera.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/camera.rs b/src/camera.rs index 34822a7..dcdff0e 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -105,7 +105,7 @@ pub fn update_fov( settings.is_zooming = true; } } else { - fov = (gforce.visual_effect * settings.fov_highspeed + settings.fov).to_radians(); + fov = (gforce.visual_effect.clamp(0.0, 1.0) * settings.fov_highspeed + settings.fov).to_radians(); if settings.is_zooming { settings.is_zooming = false; }