Spawnactor function cause stuttering when dealing with a larger amount of skeletal NPCs, ex. 20. Thoughts? Should I just stagger the spawn, or is there another way around it?
Are you using a CharacterMovementComponent for the NPCs? If so, then try switching to the Pawn class to eliminate unnecessary networking features. Also, try using the SpawnAiFromClass node.
I can offer better suggestions if you show me the CPU profiler, as that will show what exactly is causing the stutter.
Hey Jman, thanks for the reply.
Yes, it’s using character as base class. though networking is disabled.
Profiler looks something like this.
CPU stall
Looking at game thread. Seems it could be related to physics.
Edit: This is while spawning 100 chars.
Implementing the spawning via latent actions have resolved this issue.