Hey, we’re looking to use Mass Entity in 5.5.4 and are currently testing how many entities can move around before hitting our frame budget.
Our test consists of 500 entities with the `MassMovableVisualizationTrait` and an actor representation that has a single `CapsuleComponent` as the root, a `SkeletalMeshComponent` and a `MassAgentComponent` with a puppet entity containing only the `AgentCapsuleCollisionSync` trait.
As our 500 entities are navigating, we’re seeing on average of ~3ms being spent in the game thread on the `MassTransformToActorCapsuleTranslator` process, as it’s doing a lot when propagating the updated transform on the component.
This is quite a lot of time for our frame budget, especially since we intend to extend some of the Mass behaviour in StateTree.
We’ve made some optimisations already, such as setting `KinematicBonesUpdateType` to `SkipAllBones` on the `SkeletalMeshComponent`.
We’ve also tried using `UMassCharacterMovementToActorTranslator` and `UMassCharacterOrientationToActorTranslator` instead, but they seem to suffer from the same slowdowns.
We assume that the propagations from updating the transforms can’t really be simplified further, so we were hoping to try and split the process into multiple threads using `ParallelForEachEntityChunk`, but we’re coming across a lot of ensures related to physics.
Refereeing to [this [Content removed] it appears that we can’t have a call to `SetBodyTransform` in anywhere but the game thread.
Are you aware of any work-arounds or strategies we could take to reduce the cost of updating the transforms of 500+ entities in a mass process?
Thank you.