diff --git a/Gem/Code/Source/Components/NetworkAnimationComponent.cpp b/Gem/Code/Source/Components/NetworkAnimationComponent.cpp index fc7028f89..035777939 100644 --- a/Gem/Code/Source/Components/NetworkAnimationComponent.cpp +++ b/Gem/Code/Source/Components/NetworkAnimationComponent.cpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include namespace MultiplayerSample { @@ -96,6 +98,13 @@ namespace MultiplayerSample constexpr bool isAuthoritative = true; m_networkRequests->CreateSnapshot(isAuthoritative); } + + const AZ::u32 threadIndex = AZ::JobContext::GetGlobalContext()->GetJobManager().GetWorkerThreadId(); + if (threadIndex != AZ::JobManager::InvalidWorkerThreadId) + { + m_networkRequests->SetActorThreadIndex(threadIndex); + } + m_networkRequests->UpdateActorExternal(deltaTime); if (m_velocityParamId == InvalidParamIndex)