Ensure Editor FOV corrects on resize

Signed-off-by: nvsickle <nvsickle@amazon.com>
This commit is contained in:
nvsickle
2021-08-02 10:45:09 -07:00
parent e22820e08b
commit 74498089c3
+6 -2
View File
@@ -472,6 +472,12 @@ void EditorViewportWidget::Update()
m_Camera.SetZRange(cameraState.m_nearClip, cameraState.m_farClip);
}
// Ensure the FOV matches our internally stored setting if we're using the Editor camera
if (!m_viewEntityId.IsValid() && !GetIEditor()->IsInGameMode())
{
SetFOV(GetFOV());
}
// Reset the camera update flag now that we're finished updating our viewport context
m_updateCameraPositionNextTick = false;
@@ -2624,8 +2630,6 @@ void EditorViewportWidget::DestroyRenderContext()
//////////////////////////////////////////////////////////////////////////
void EditorViewportWidget::SetDefaultCamera()
{
// Ensure the FOV matches our internally stored setting
SetFOV(GetFOV());
if (IsDefaultCamera())
{
return;