link textIn my projectm I’ve faced with unexpected performance downgrade when I have about 100 characters on the scene.
Profiler shows me it goes from the CharacterMovementComponent which is used for each of the characters.
I’ve made a test scene in a blank project with static mesh cubes and it shows the same downgrade when 100-200 characters are moving (MoveToActor). FPS drop from 120fps when not moving to 30-40fps when they are all moving.
Is it expected performance issue because of too much characters or it’s a bug and simple movement should not downgrade the performance so much?
Attaching the test project (made in UE4.20.3)
the character movement can be a expensive process so performance loss is expected with that many characters. you may need to create a custom movement solution for your particular case that runs a bit lighter and has less features. you could probably create the needed features using a pawn instead of a character then use the simple move to nodes and only have what you need so it performs better.
Hmm, thank you… I just did not expect that 100-200 characters is considered “that many” in UE4
1 Like
think of it like this how many games do you know of that have 100+ complex characters in the immediate area of the player, not many id wager. the character movement component has many features that you really dont need for basic enemies and npcs. imagine all those features your not using running on tick, they may not be heavy themselves but when you have say 10 processes on 100 enemies, plus rendering geometry, textures, and animations, it can really begin slowing down.
Well, not sure. Any RTS game, for example. Or any Crimsonland-style game (which is what I’m working on, for instance). I understand those ideas, just did not expect the limits are so low. Anyway, probably I don’t have any option and will have to implement own simple movement controller…
1 Like
for a rts you dont need any kind of complex movement you just need a simple move to movement. also in rts you dont need things like jump and crouch for the bulk of basic enemies. as for the other game mentioned ive never heard of it so i cant really comment there.
That’s true, I only need simple movement. But at the same time I need animations and so on, so I have to use ACharacter and not APawn. And CharacterMovementComponet does not allow to disable all unused features… Also, the most impact is goes not from the jump/crouch checks etc, but from the movement function itself, in fact it’s going from a PrimitiveComponent methods (which are called from the movement component)…
1 Like