Carry first-person facing into orbit camera on mode switch
When leaving first person for an orbit mode (Paint / Player Control), snap the orbit axes to Camera.main's current view direction instead of restoring the orbit's last-used angle. With WorldSpace binding + Sphere orbit + a centered composer the camera look rotation is exactly Euler(VerticalAxis, HorizontalAxis, 0), so the inverse mapping is exact. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
054cadbd80
commit
a7a4fbdcb7
2 files changed
+31
-1
No files matched your search
@@ -36,6 +36,12 @@ public class FirstPersonMode : GameMode
|
||||
Manager.FirstPerson.SetActive(false);
|
||||
|
||||
if (Manager.CameraInput)
|
||||
{
|
||||
Manager.CameraInput.enabled = true;
|
||||
// Carry the first-person facing into the orbit camera so the next orbit mode (Paint / Player
|
||||
// Control) keeps the current view angle instead of snapping back to the orbit's last-used angle.
|
||||
// Camera.main still shows the first-person view this frame (the brain hasn't blended yet).
|
||||
Manager.CameraInput.SyncToView();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user