Fix several viewport issues (#1045)

* Fix some FOV calculation viewport issues:
-Avoid calculating FOV if we've got an invalid viewport
-Don't override game mode FOV, let the active camera components manage it instead

* Fix viewport font positioning

This updates code in a few places to respect an API change/fix made to AtomFont - also switched the default value of m_virtual800x600ScreenSize to false as it's really behavior you want to opt into

* Don't activate CameraComponentController when in the Editor / not in game mode
This commit is contained in:
Nicholas Van Sickle
2021-06-01 12:20:15 -07:00
committed by GitHub
parent 853cf291be
commit 087677b326
6 changed files with 28 additions and 29 deletions
@@ -240,7 +240,9 @@ namespace Camera
CameraBus::Handler::BusConnect();
CameraNotificationBus::Broadcast(&CameraNotificationBus::Events::OnCameraAdded, m_entityId);
if (m_config.m_makeActiveViewOnActivation)
// Activate our camera if we're running from the launcher or Editor game mode
// Otherwise, let the Editor keep managing the active camera
if (m_config.m_makeActiveViewOnActivation && (!gEnv || !gEnv->IsEditor() || gEnv->IsEditorGameMode()))
{
MakeActiveView();
}