feat(app): Phase B.2 — CameraController chase mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-04-12 14:29:47 +02:00
parent fe1c949775
commit e5e1245efb

View file

@ -5,8 +5,10 @@ public sealed class CameraController
{
public OrbitCamera Orbit { get; }
public FlyCamera Fly { get; }
public ChaseCamera? Chase { get; private set; }
public ICamera Active { get; private set; }
public bool IsFlyMode => Active == Fly;
public bool IsChaseMode => Chase is not null && Active == Chase;
public event Action<bool>? ModeChanged;
@ -23,6 +25,20 @@ public sealed class CameraController
ModeChanged?.Invoke(IsFlyMode);
}
public void EnterChaseMode(ChaseCamera chase)
{
Chase = chase;
Active = chase;
ModeChanged?.Invoke(IsChaseMode);
}
public void ExitChaseMode()
{
Active = Fly;
Chase = null;
ModeChanged?.Invoke(IsFlyMode);
}
public void SetAspect(float aspect)
{
Orbit.Aspect = aspect;