How do I move a large number of actors?

Hello.
I am writing my own implementation of a mass simulation system.
The biggest challenge I have yet faced is being able to move a large number of actors at the same time in less than 16 milliseconds.

I have made a simple test, which moves 1000 actors in every tick.

The profiler shows that my code spends most of its time updating Static Meshes.
This is after disabling physics, collision and navigation updates.

What options do I have to be able to perform a simulation of this kind while maintaining playable framerates?

I found 2 things that might help.

  • Disable Generate Overlap Events
  • Disable Can Ever Affect Navigation.
2 Likes

I can’t edit my last comment.
But with the setup, I have in my game.
Moving ~2000 objects takes me 1.4ms.

StaticMeshComponent->SetRelativeLocation_Direct(m_lastSetPos);
StaticMeshComponent->UpdateComponentToWorld(
EUpdateTransformFlags::SkipPhysicsUpdate,
ETeleportType::None
);
1 Like