From f6945f13346fa4826b35778bda6aad0a97649976 Mon Sep 17 00:00:00 2001 From: igarri Date: Mon, 18 Oct 2021 16:25:25 +0100 Subject: [PATCH] Fixed Viewport Interaction Signed-off-by: igarri --- .../AzManipulatorTestFramework/AzManipulatorTestFramework.h | 2 ++ .../Include/AzManipulatorTestFramework/ViewportInteraction.h | 1 + .../Source/ViewportInteraction.cpp | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFramework.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFramework.h index a911534dd9..10036b0899 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFramework.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFramework.h @@ -46,6 +46,8 @@ namespace AzManipulatorTestFramework virtual void UpdateVisibility() = 0; //! Set if sticky select is enabled or not. virtual void SetStickySelect(bool enabled) = 0; + //! Get default Editor Camera Position. + virtual AZ::Vector3 DefaultEditorCameraPosition() = 0; }; //! This interface is used to simulate the manipulator manager while the manipulators are under test. diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h index cfecc0c91a..0ba408224e 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h @@ -36,6 +36,7 @@ namespace AzManipulatorTestFramework int GetViewportId() const override; void UpdateVisibility() override; void SetStickySelect(bool enabled) override; + AZ::Vector3 DefaultEditorCameraPosition() override; // ViewportInteractionRequestBus overrides ... AzFramework::CameraState GetCameraState() override; diff --git a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp index 509674e5c0..7c3836d447 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp @@ -120,6 +120,11 @@ namespace AzManipulatorTestFramework m_stickySelect = enabled; } + AZ::Vector3 ViewportInteraction::DefaultEditorCameraPosition() + { + return {}; + } + void ViewportInteraction::SetGridSize(float size) { m_gridSize = size;