Keep the paint-mode pan on release and scale it by zoom

The middle-mouse pan now persists when the button is released and only glides back to center on leaving paint mode. Pan sensitivity and max distance scale with the orbit zoom distance, so panning stays consistent on screen at any zoom and unchanged at the default zoom.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 4.8 committed 2026-06-30 19:25:45 +02:00
1 parent 4e8a907a8c
commit 3fa99f32fe
2 files changed
+124 -2

No files matched your search

+12 -1
View File
@@ -1,6 +1,7 @@
/// <summary>
/// Player stands still, the mesh is painted with the left mouse button. The
/// camera orbits only while the right mouse button is held.
/// camera orbits only while the right mouse button is held, and the middle
/// mouse button pans the framing (a temporary offset to line up the model).
/// </summary>
public class PaintMode : GameMode
{
@@ -18,9 +19,19 @@ public class PaintMode : GameMode
}
if (Manager.CameraInput)
{
Manager.CameraInput.LookMode = ThirdPersonOrbitInput.OrbitLookMode.HoldRightMouseButton;
Manager.CameraInput.PanEnabled = true;
}
if (Manager.Painter)
Manager.Painter.PaintingEnabled = true;
}
public override void Exit()
{
// Leaving paint mode releases the middle-mouse pan; the orbit input then eases the framing home.
if (Manager.CameraInput)
Manager.CameraInput.PanEnabled = false;
}
}