diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/EditorContextMenu.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/EditorContextMenu.cpp index 300820c2df..7fa9724d65 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/EditorContextMenu.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/EditorContextMenu.cpp @@ -65,7 +65,7 @@ namespace AzToolsFramework if (!contextMenu.m_menu->isEmpty()) { - contextMenu.m_menu->popup(QCursor::pos()); + contextMenu.m_menu->exec(QCursor::pos()); } } } diff --git a/Code/Sandbox/Editor/LegacyViewportCameraController.cpp b/Code/Sandbox/Editor/LegacyViewportCameraController.cpp index 0c34706e24..44b722d222 100644 --- a/Code/Sandbox/Editor/LegacyViewportCameraController.cpp +++ b/Code/Sandbox/Editor/LegacyViewportCameraController.cpp @@ -342,7 +342,6 @@ bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFra m_inRotateMode = true; } - shouldConsumeEvent = true; shouldCaptureCursor = true; } else if (state == InputChannel::State::Ended) diff --git a/Code/Sandbox/Editor/ViewManager.cpp b/Code/Sandbox/Editor/ViewManager.cpp index b08c40cf2d..268bc19963 100644 --- a/Code/Sandbox/Editor/ViewManager.cpp +++ b/Code/Sandbox/Editor/ViewManager.cpp @@ -37,7 +37,7 @@ #include #include -AZ_CVAR(bool, ed_useAtomNativeViewport, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Use the new Atom-native Editor viewport (experimental, not yet stable"); +AZ_CVAR(bool, ed_useAtomNativeViewport, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Use the new Atom-native Editor viewport (experimental, not yet stable"); bool CViewManager::IsMultiViewportEnabled() { diff --git a/Code/Sandbox/Editor/ViewportManipulatorController.cpp b/Code/Sandbox/Editor/ViewportManipulatorController.cpp index b45dc711ee..910d037670 100644 --- a/Code/Sandbox/Editor/ViewportManipulatorController.cpp +++ b/Code/Sandbox/Editor/ViewportManipulatorController.cpp @@ -21,8 +21,8 @@ #include -static const auto ManipulatorPriority = AzFramework::ViewportControllerPriority::Highest; -static const auto InteractionPriority = AzFramework::ViewportControllerPriority::High; +static const auto ManipulatorPriority = AzFramework::ViewportControllerPriority::High; +static const auto InteractionPriority = AzFramework::ViewportControllerPriority::Low; namespace SandboxEditor { diff --git a/Gems/Camera/Code/Source/CameraComponentController.cpp b/Gems/Camera/Code/Source/CameraComponentController.cpp index e66de5b95b..2799d897d6 100644 --- a/Gems/Camera/Code/Source/CameraComponentController.cpp +++ b/Gems/Camera/Code/Source/CameraComponentController.cpp @@ -98,15 +98,16 @@ namespace Camera AZ_Assert(m_atomCamera, "Attempted to activate Atom camera before component activation"); const AZ::Name contextName = atomViewportRequests->GetDefaultViewportContextName(); - atomViewportRequests->PushView(contextName, m_atomCamera); - AZ::RPI::ViewportContextNotificationBus::Handler::BusConnect(contextName); - // Ensure the Atom camera is updated with our current transform state AZ::Transform localTransform; AZ::TransformBus::EventResult(localTransform, m_entityId, &AZ::TransformBus::Events::GetLocalTM); AZ::Transform worldTransform; AZ::TransformBus::EventResult(worldTransform, m_entityId, &AZ::TransformBus::Events::GetWorldTM); OnTransformChanged(localTransform, worldTransform); + + // Push the Atom camera after we make sure we're up-to-date with our component's transform to ensure the viewport reads the correct state + atomViewportRequests->PushView(contextName, m_atomCamera); + AZ::RPI::ViewportContextNotificationBus::Handler::BusConnect(contextName); UpdateCamera(); } }