From d867452dcbc95df327af7ce00ca8b80242fda2dd Mon Sep 17 00:00:00 2001 From: MelekTaus Moribundus Date: Thu, 2 Jul 2026 18:26:35 +0200 Subject: [PATCH] Fix: allow wheel zoom while sprinting (Shift) The orbit camera suppressed wheel zoom whenever Shift/Ctrl was held, to reserve Shift/Ctrl+wheel for the paint brush resize. But Shift is also the sprint key, so sprinting blocked zoom outside paint mode. Gate the reservation on PanEnabled (set only by PaintMode.Enter/Exit), so the wheel is only claimed for brush resize while actually in paint mode; otherwise it zooms normally. Co-Authored-By: Claude Opus 4.8 --- .../Components/Controller/ThirdPersonOrbitInput.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Components/Controller/ThirdPersonOrbitInput.cs b/Assets/Scripts/Components/Controller/ThirdPersonOrbitInput.cs index 222767e..f089884 100644 --- a/Assets/Scripts/Components/Controller/ThirdPersonOrbitInput.cs +++ b/Assets/Scripts/Components/Controller/ThirdPersonOrbitInput.cs @@ -238,9 +238,11 @@ public class ThirdPersonOrbitInput : MonoBehaviour float scale = CurrentScale(); - // Shift/Ctrl+wheel is reserved for the paint brush resize (MeshPainter), so the orbit camera - // ignores the wheel while either is held - otherwise it would zoom and resize at once. - float scroll = (InputUtil.ShiftHeld() || InputUtil.CtrlHeld()) ? 0f : InputUtil.ReadScroll(); + // Shift/Ctrl+wheel is reserved for the paint brush resize (MeshPainter) - but only in paint + // mode (PanEnabled), where the resize actually claims the wheel. Outside paint mode Shift is + // the sprint key, so the wheel must still zoom. + bool brushResizeClaimsWheel = PanEnabled && (InputUtil.ShiftHeld() || InputUtil.CtrlHeld()); + float scroll = brushResizeClaimsWheel ? 0f : InputUtil.ReadScroll(); if (!Mathf.Approximately(scroll, 0f)) { // One wheel notch = one zoom step (sign only, platform-independent). The step scales with