AI performance

Could you please try to use UNavMovementComponent rather than UCharacterMovementComponent? As your performance picture shows, Char Movement Total was very expensive. Because the UCharacterMovementComponent will keeping execute FindFloor method when Performing move. This is a sweep operator(GeomSweepSingle) based on scene query of physx, it is expensive.
In FPS and TPS games, the real player characters should use UCharacterMovementComponent because of the networking features such as Client Prediction and Server Reconcile and so forth. But in RTS games, the character is actual a AI agent. Pathfinding based on navmesh is the key point for moving. So I think UNavMovementComponent is enough.

1 Like