Posted June 10, 2023 by SourLemonStudio
AUTHOR: Mike McGoveran
DATE: 6/9/2023
The Problem:
When building towards our Alpha Build we implemented an AI that was tasked with patrolling our entire level at random. This highlighted the first sign that the built in Character Navigation Component in UE5 was too expensive in performance for our game. The answer was the beginning of retargeting the AI entities to all be a more bare bones class of Pawn Instead of Character. Once this retarget was done we had to implement pawn movement through the PawnFlyingMovement Component. This significantly reduced the load on movement calculations in our map but at the same time our NavMesh showed a sudden performance cost increase of 20-30 FPS. Upon Further investigation I learned that the NavMesh system has issues with long distance pathing requests in a system on the back-end that was only supposed to be temporary over 6 years ago. In addition we are forced into using the fully dynamic NavMesh due to pathing being affected by doors that open and the fact that our level is dynamically created so we can't bake in the NavMesh,
The Solution: