Fix FOV getting reset upon entering game mode (#2216)

* Fix FOV getting reset upon entering game mode

Signed-off-by: nvsickle <nvsickle@amazon.com>

* Ensure scenes load with the correct FOV

Signed-off-by: nvsickle <nvsickle@amazon.com>
This commit is contained in:
Nicholas Van Sickle
2021-07-21 09:53:17 -07:00
committed by GitHub
parent d086e45d22
commit b198d653c1
+2 -1
View File
@@ -469,7 +469,6 @@ void EditorViewportWidget::Update()
auto m = AZMatrix3x4ToLYMatrix3x4(matrix);
SetViewTM(m);
SetFOV(cameraState.m_fovOrZoom);
m_Camera.SetZRange(cameraState.m_nearClip, cameraState.m_farClip);
}
@@ -2614,6 +2613,8 @@ void EditorViewportWidget::DestroyRenderContext()
//////////////////////////////////////////////////////////////////////////
void EditorViewportWidget::SetDefaultCamera()
{
// Ensure the FOV matches our internally stored setting
SetFOV(GetFOV());
if (IsDefaultCamera())
{
return;