feat(camera): InputAction + DebugVM surface for retail chase camera

Four new InputAction entries for held-key offset integration
(CameraZoomIn/Out, CameraRaise/Lower; default unbound). Six new
DebugVM mirror properties forwarding to CameraDiagnostics so the
upcoming "Chase camera" DebugPanel section can drive them live.

Also folds in four small cleanups from the Task 4 code review:
- Both CameraDiagnostics-mutating tests in CameraControllerTests now
  use try/finally save/restore (consistency with Task-3 follow-up B)
- Drop unused `using System.Numerics` from CameraControllerTests
- Reword the XML doc on CameraController.Active to explain WHY both
  cameras are held simultaneously (flag flip takes effect on the
  next Active access without re-entry) rather than restating the
  getter logic

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-05-18 20:04:34 +02:00
parent e5a5916679
commit 91086adbac
4 changed files with 115 additions and 33 deletions

View file

@ -1,6 +1,7 @@
using System.Numerics;
using AcDream.Core.Combat;
using AcDream.Core.Physics;
using AcDream.Core.Rendering;
namespace AcDream.UI.Abstractions.Panels.Debug;
@ -290,6 +291,50 @@ public sealed class DebugVM
set => PhysicsDiagnostics.ProbeAutoWalkEnabled = value;
}
// ── Chase camera tunables (forward to CameraDiagnostics) ──────────
/// <summary>Runtime mirror of <see cref="CameraDiagnostics.UseRetailChaseCamera"/>.</summary>
public bool UseRetailChaseCamera
{
get => CameraDiagnostics.UseRetailChaseCamera;
set => CameraDiagnostics.UseRetailChaseCamera = value;
}
/// <summary>Runtime mirror of <see cref="CameraDiagnostics.AlignToSlope"/>.</summary>
public bool CameraAlignToSlope
{
get => CameraDiagnostics.AlignToSlope;
set => CameraDiagnostics.AlignToSlope = value;
}
/// <summary>Runtime mirror of <see cref="CameraDiagnostics.TranslationStiffness"/>.</summary>
public float CameraTranslationStiffness
{
get => CameraDiagnostics.TranslationStiffness;
set => CameraDiagnostics.TranslationStiffness = value;
}
/// <summary>Runtime mirror of <see cref="CameraDiagnostics.RotationStiffness"/>.</summary>
public float CameraRotationStiffness
{
get => CameraDiagnostics.RotationStiffness;
set => CameraDiagnostics.RotationStiffness = value;
}
/// <summary>Runtime mirror of <see cref="CameraDiagnostics.MouseLowPassWindowSec"/>.</summary>
public float CameraMouseLowPassWindowSec
{
get => CameraDiagnostics.MouseLowPassWindowSec;
set => CameraDiagnostics.MouseLowPassWindowSec = value;
}
/// <summary>Runtime mirror of <see cref="CameraDiagnostics.CameraAdjustmentSpeed"/>.</summary>
public float CameraAdjustmentSpeed
{
get => CameraDiagnostics.CameraAdjustmentSpeed;
set => CameraDiagnostics.CameraAdjustmentSpeed = value;
}
// ── Action hooks invoked by panel buttons ──────────────────────────
/// <summary>