Browse Source

Motion Matching: Removed editor related debug viz from the game system component

Signed-off-by: Benjamin Jillich <[email protected]>
Benjamin Jillich 3 years ago
parent
commit
b69b71c5f8

+ 1 - 7
Gems/MotionMatching/Code/Source/MotionMatchingSystemComponent.cpp

@@ -17,8 +17,6 @@
 
 #include <Integration/EMotionFXBus.h>
 
-#include <EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ViewportPluginBus.h>
-
 #include <BlendTreeMotionMatchNode.h>
 #include <Feature.h>
 #include <FeaturePosition.h>
@@ -169,10 +167,6 @@ namespace EMotionFX::MotionMatching
 
     void MotionMatchingSystemComponent::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time)
     {
-        // Draw the debug visualizations to the Animation Editor as well as the LY Editor viewport.
-        AZ::s32 animationEditorViewportId = -1;
-        EMStudio::ViewportPluginRequestBus::BroadcastResult(animationEditorViewportId, &EMStudio::ViewportPluginRequestBus::Events::GetViewportId);
-        DebugDraw(animationEditorViewportId);
-        DebugDraw(AzFramework::g_defaultSceneEntityDebugDisplayId);
+        MotionMatchingSystemComponent::DebugDraw(AzFramework::g_defaultSceneEntityDebugDisplayId);
     }
 } // namespace EMotionFX::MotionMatching

+ 4 - 2
Gems/MotionMatching/Code/Source/MotionMatchingSystemComponent.h

@@ -12,6 +12,7 @@
 #include <AzCore/Component/TickBus.h>
 #include <MotionMatching/MotionMatchingBus.h>
 
+
 namespace EMotionFX::MotionMatching
 {
     class MotionMatchingSystemComponent
@@ -33,7 +34,7 @@ namespace EMotionFX::MotionMatching
         ~MotionMatchingSystemComponent();
 
     protected:
-        void DebugDraw(AZ::s32 debugDisplayId);
+        virtual void DebugDraw(AZ::s32 debugDisplayId);
 
         ////////////////////////////////////////////////////////////////////////
         // AZ::Component interface implementation
@@ -48,7 +49,8 @@ namespace EMotionFX::MotionMatching
         {
             return AZ::TICK_PRE_RENDER;
         }
-        void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
+        virtual void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
         ////////////////////////////////////////////////////////////////////////
+
     };
 } // namespace EMotionFX::MotionMatching