Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

CharacterMovementComponent low performance?

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)

Product Version: UE 4.20
movementlag.zip (1.1 MB)
more ▼

asked Nov 09 '18 at 09:25 PM in Bug Reports

avatar image

239 10 18 22

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Nov 09 '18 at 10:42 PM

avatar image

10.1k 33 9 23

avatar image norlin Nov 10 '18 at 09:09 AM

Hmm, thank you... I just did not expect that 100-200 characters is considered "that many" in UE4 :-(

avatar image ThompsonN13 Nov 10 '18 at 02:56 PM

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.

avatar image norlin Nov 11 '18 at 08:11 AM

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...

avatar image ThompsonN13 Nov 11 '18 at 03:03 PM

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.

avatar image norlin Nov 11 '18 at 08:47 PM

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)...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question