The event begin play of the “Magic_MultiProjectiles” takes up an average time of 0.035ms of your average frame time of 11.390ms so nothing that could constantly drag down your frame rate, but it causes some spikes in your frame time (since it is adding around 6ms to the frame you’re executing it in), so you might wanna change this logic later on since this will/could cause you to drop from 60fps for the frame where you spawn it and therefore could lead to a short lag.
So it’s the character movement of your bots that is causing you the low frame rates. And from what you say it seems to me that the reason why it sometimes takes up more time is somehow related to the projectiles of the player.
Further from looking at the frame times it seems to me that as you fire the “Magic_MultiProjectiles”, they get removed you fire them again and so on, your framerate starts to continuously go down and stays down even if there are no “Magic_MultiProjectiles” anymore. But the moment you destroy all the 18 bots the frame time goes up to normal again and stays high even when you spawn the 18 bots again. [HR][/HR]
Since I don’t know what causes this I would go with a trial and error approach to try narrow it down. Some things I would try (in different combinations and not necessary in this order)
(1) make sure it is not related to your level or to your specific project/project settings. So try it in a new level that contains only what is absolutely necessary. If this changes nothing try it in a blank project and there in a new level (so migrate the player, the bot, and the player projectile over to the new blank project).
Since it is apparently related to the character movement of your 18 bots and the “Magic_MutliProjectiles”
(2) Try making a new projectile where you only have what is absolutely necessary and use that instead of the “Magic_MultiProjectiles” and see if that still causes the problem, then continue adding logic there until you either experience the performance problem again, or have the same logic as in the old “Magic_MultiProjectiles”
(3) Try to use a different bot that inherits from character and start with as less as possible and continue testing and adding logic until you either experience the performance problem again, or have the same logic inside this new bot as you had in your old drone bot.
(4) Try changing the movement mode of your drone bots, so maybe try “flying” instead of the default “walking”.
(5) I don’t know enough about navigation/movement/collision so I don’t know if this could change something, but you could try creating a new collision type for your “Magic_MultiProjectile” and then
(-) set both your capsule component and the mesh of your drone bot to ignore this collision type, so the “Magic_MultiProjectile” should just fly through your bot without any collision if that solves the performance problem, then
(-) set the mesh of the drone to block the collision type of your projectiles, so now the projectile should again collide with the drone bot, and see if the performance problem returns