From 08b3efc4c594004370a3c817cc092d3e94a020b5 Mon Sep 17 00:00:00 2001 From: Kinsi Date: Tue, 15 Nov 2022 19:14:11 +0100 Subject: [PATCH] Fix --- Configuration/CameraSettings.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Configuration/CameraSettings.cs b/Configuration/CameraSettings.cs index c2a08e0..710ca06 100644 --- a/Configuration/CameraSettings.cs +++ b/Configuration/CameraSettings.cs @@ -352,11 +352,11 @@ ScreenRect _viewRectCfg { value.width = Math.Min(2, Math.Abs(value.width)); value.height = Math.Min(2, Math.Abs(value.height)); - var _x = value.width * .5f; - var _y = value.height * .5f; + var _x = value.width * .75f; + var _y = value.height * .75f; - value.x = Mathf.Clamp(value.x, -_x, _x); - value.y = Mathf.Clamp(value.y, -_y, _y); + value.x = Mathf.Clamp(value.x, -_x, Math.Max(0.75f, 1 - _x)); + value.y = Mathf.Clamp(value.y, -_y, Math.Max(0.75f, 1 - _y)); viewRect = value; }