From ce0c62268a106cb278335d1e38ac5979f8e028bc Mon Sep 17 00:00:00 2001 From: Tobias Alexander Franke Date: Fri, 15 Oct 2021 14:26:37 +0800 Subject: [PATCH] Parameters of the Simple LOD distance component still take effect after Enable anim graph is disabled. Signed-off-by: T.J. McGrath-Daly --- .../Code/Source/Integration/Components/SimpleLODComponent.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gems/EMotionFX/Code/Source/Integration/Components/SimpleLODComponent.cpp b/Gems/EMotionFX/Code/Source/Integration/Components/SimpleLODComponent.cpp index fdc6426e4c..ec94a9a15d 100644 --- a/Gems/EMotionFX/Code/Source/Integration/Components/SimpleLODComponent.cpp +++ b/Gems/EMotionFX/Code/Source/Integration/Components/SimpleLODComponent.cpp @@ -232,6 +232,10 @@ namespace EMotionFX const float updateRateInSeconds = animGraphSampleRate > 0.0f ? 1.0f / animGraphSampleRate : 0.0f; actorInstance->SetMotionSamplingRate(updateRateInSeconds); } + else if (actorInstance->GetMotionSamplingRate() != 0) + { + actorInstance->SetMotionSamplingRate(0); + } // Disable the automatic mesh LOD level adjustment based on screen space in case a simple LOD component is present. // The simple LOD component overrides the mesh LOD level and syncs the skeleton with the mesh LOD level.