Fix: wheel over UI scrolls the list instead of zooming the camera

The orbit rig read the wheel unfiltered for zoom, so scrolling a paint-mode
scroll list also zoomed the camera. Gate the zoom behind a shared
InputUtil.PointerOverUi() helper (EventSystem raycast); MeshPainter's private
IsPointerOverUi() now delegates to the same helper (DRY).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 4.8 committed 2026-07-03 16:04:51 +02:00
1 parent a4604328d2
commit 50efc7e8b3
3 files changed
+18 -11

No files matched your search

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif
@@ -1123,11 +1122,7 @@ public partial class MeshPainter : MonoBehaviour
}
/// <summary>True if the pointer is currently over an interactive UI element (raycast target).</summary>
private static bool IsPointerOverUi()
{
var es = EventSystem.current;
return es && es.IsPointerOverGameObject();
}
private static bool IsPointerOverUi() => InputUtil.PointerOverUi();
private void OnDestroy()
{