Skip threaded physics actors update when single-threaded mode

This commit is contained in:
Wojtek Figat
2026-03-04 21:30:31 +01:00
parent 6c19996f95
commit 2d9ca4c335

View File

@@ -1973,6 +1973,7 @@ void PhysicsBackend::EndSimulateScene(void* scene)
PxActor** activeActors = scenePhysX->Scene->getActiveActors(activeActorsCount);
// Update changed transformations
#if PLATFORM_THREADS_LIMIT > 1
if (activeActorsCount > 50 && JobSystem::GetThreadsCount() > 1)
{
// Run in async via job system
@@ -1982,6 +1983,7 @@ void PhysicsBackend::EndSimulateScene(void* scene)
JobSystem::Execute(FlushActiveTransforms, JobSystem::GetThreadsCount());
}
else
#endif
{
for (uint32 i = 0; i < activeActorsCount; i++)
{