This commit is contained in:
Matt F 2026-05-10 22:26:55 -07:00
parent f7720a9915
commit 6c37e569ab
18 changed files with 1169 additions and 323 deletions

View file

@ -3,6 +3,7 @@ using UnityEngine;
using UnityEngine.InputSystem;
using TD.Core;
using TD.Levels;
using TD.UI;
namespace TD.Gameplay
{
@ -218,6 +219,12 @@ namespace TD.Gameplay
var kb = Keyboard.current;
if (mouse == null) return;
// If the cursor is over an interactive HUD element (e.g., the minimap, which has
// its own scroll-wheel zoom), don't also drive the world camera. UI Toolkit's
// WheelEvent.StopPropagation only blocks UI-side bubbling — it has no effect on
// raw Input System polling, so we have to gate here explicitly.
if (HUDController.IsPointerOverInteractiveHud(mouse.position.ReadValue())) return;
// Scroll wheel values are inconsistent across platforms and devices:
// - Windows click-wheel mice: ±120 per click (legacy Win32 convention)
// - Free-spin wheels and trackpads: small fractional values per tick