feat(camera): DebugPanel "Chase camera" section with live tunables
New CollapsingHeader between Player Info and Performance: toggle + slope-align checkbox + four sliders (translation stiffness, rotation stiffness, mouse low-pass window, adjustment speed). All controls write through DebugVM mirror properties to CameraDiagnostics statics; changes take effect on the next frame. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
91086adbac
commit
ff8f434711
1 changed files with 28 additions and 0 deletions
|
|
@ -80,6 +80,7 @@ public sealed class DebugPanel : IPanel
|
|||
}
|
||||
|
||||
DrawPlayerInfo(renderer);
|
||||
DrawChaseCamera(renderer);
|
||||
DrawPerformance(renderer);
|
||||
DrawCompass(renderer);
|
||||
DrawHelp(renderer);
|
||||
|
|
@ -123,6 +124,33 @@ public sealed class DebugPanel : IPanel
|
|||
r.Text($"sens: {_vm.MouseSensitivity:F3}x");
|
||||
}
|
||||
|
||||
private void DrawChaseCamera(IPanelRenderer r)
|
||||
{
|
||||
if (!r.CollapsingHeader("Chase camera", defaultOpen: true)) return;
|
||||
|
||||
bool useRetail = _vm.UseRetailChaseCamera;
|
||||
bool alignSlope = _vm.CameraAlignToSlope;
|
||||
float tStiff = _vm.CameraTranslationStiffness;
|
||||
float rStiff = _vm.CameraRotationStiffness;
|
||||
float lpWindow = _vm.CameraMouseLowPassWindowSec;
|
||||
float adjSpeed = _vm.CameraAdjustmentSpeed;
|
||||
|
||||
if (r.Checkbox("Use retail chase camera (env: ACDREAM_RETAIL_CHASE)", ref useRetail))
|
||||
_vm.UseRetailChaseCamera = useRetail;
|
||||
|
||||
if (r.Checkbox("Align to slope (env: ACDREAM_CAMERA_ALIGN_SLOPE)", ref alignSlope))
|
||||
_vm.CameraAlignToSlope = alignSlope;
|
||||
|
||||
if (r.SliderFloat("Translation stiffness", ref tStiff, 0.05f, 1.0f))
|
||||
_vm.CameraTranslationStiffness = tStiff;
|
||||
if (r.SliderFloat("Rotation stiffness", ref rStiff, 0.05f, 1.0f))
|
||||
_vm.CameraRotationStiffness = rStiff;
|
||||
if (r.SliderFloat("Mouse low-pass window (s)", ref lpWindow, 0.0f, 0.5f))
|
||||
_vm.CameraMouseLowPassWindowSec = lpWindow;
|
||||
if (r.SliderFloat("Adjustment speed (units/s)", ref adjSpeed, 10f, 80f))
|
||||
_vm.CameraAdjustmentSpeed = adjSpeed;
|
||||
}
|
||||
|
||||
private void DrawPerformance(IPanelRenderer r)
|
||||
{
|
||||
if (!r.CollapsingHeader("Performance", defaultOpen: true)) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue