AI Causing Lag

The AI for our game uses the Character Movement Component, and I think this is main source of lag in our game. When I type stat GAME in the console, it shows something called “Char Movement Authority Time” is taking a lot of time. Now our game is a single player game, and as far as I am aware Authority is something that you only need to worry about when you are trying to talk to servers. So my question is, is there any way to turn this off? I have tried unchecking all of the boxes that have anything to do with replication, but this doesn’t help. Any ideas? Is it because in the behavior tree I am casting to CharMovementComponent so I can change the AI’s walking speed? I am using the 4.6 version of the engine.

Just to get some more information from you, because i guess our AI God will answer your post better than me:

How many AIs do you have in your Game? Is it just one that cause the lag or are you spawning 100 of them?

I originally noticed this problem when I had 200 AI characters on the map, which while should cause some framerate issues, I don’t think it shouldn’t have been causing such severe framrate issues, now we are down to around 40 AI, and the framerate is better, but the Char Movement Authority Time is still slowing down the framerate more than I would like it too.

Hm ok, but it is known that you can’t have so many AIs with a MovementComponent without getting lags. Though i don’t have a workaround for you, because i haven’t worked with so many AIs yet.

Yeah, I was just wondering what the Char Movement Authority Time was and if I was able to turn it off or something.

I know this post is extremely old, but Im surprised no one answered your question.

If you’re making a single player game don’t use CharacterMovementComponent, instead use a PawnMovementComponent. If you are inheriting from a character, don’t panic you can just remove the CharacterMovementComponent and add your own PawnMovementComponent in the constructor.

But keep in mind if you choose to use PawnMovementComponent over the CharacterMovementComponent you are forfeiting all (built in) networking capabilities, the PawnMovementComponent is very basic and only handles basic movements; essentially any complicated movements would have to be written by you through a custom PawnMovementComponent.