Merge commit '593f03efb4996ae8bb8e1f53a55e2ba00e022449' into puvvadar/gitflow_211118_o3de

This commit is contained in:
puvvadar
2021-11-18 09:37:11 -08:00
10 changed files with 197 additions and 29 deletions
@@ -1675,6 +1675,12 @@ void SandboxIntegrationManager::GoToEntitiesInViewports(const AzToolsFramework::
if (auto viewportContext = viewportContextManager->GetViewportContextById(viewIndex))
{
const AZ::Transform cameraTransform = viewportContext->GetCameraTransform();
// do not attempt to interpolate to where we currently are
if (cameraTransform.GetTranslation().IsClose(center))
{
continue;
}
const AZ::Vector3 forward = (center - cameraTransform.GetTranslation()).GetNormalized();
// move camera 25% further back than required