From 6144f6c74e16961992cb8599fb62b29772fa8002 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 19 Jun 2025 09:50:07 +0200 Subject: [PATCH] Optimize physics simulation with higher limit of `8` threads --- Source/Engine/Physics/PhysX/PhysicsBackendPhysX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Physics/PhysX/PhysicsBackendPhysX.cpp b/Source/Engine/Physics/PhysX/PhysicsBackendPhysX.cpp index b15b22a9b..673b1e96d 100644 --- a/Source/Engine/Physics/PhysX/PhysicsBackendPhysX.cpp +++ b/Source/Engine/Physics/PhysX/PhysicsBackendPhysX.cpp @@ -1794,7 +1794,7 @@ void* PhysicsBackend::CreateScene(const PhysicsSettings& settings) { if (CpuDispatcher == nullptr) { - uint32 threads = Math::Clamp(Platform::GetCPUInfo().ProcessorCoreCount - 1, 1, 4); + uint32 threads = Math::Clamp(Platform::GetCPUInfo().ProcessorCoreCount - 1, 1, 8); CpuDispatcher = PxDefaultCpuDispatcherCreate(threads); CHECK_INIT(CpuDispatcher, "PxDefaultCpuDispatcherCreate failed!"); }