AXEL FRANZÉN

GRAPHICS & ENGINE PROGRAMMER

NAVIGATION MESH

In this video I had begun setting up the structure for the navigation mesh, with navigation nodes and edges that connect them.

To test my implementation of the Astar-algorithm I set up a level with a randomly generated mesh that the agents could move on. In the video there is one player controlled character that moves to the point where the player clicks, and two simple AI agents that will randomly walk to random points on the mesh, but if the player gets too close they will start chasing.

Creating the navmesh from an FBX-file meant that I had to iterate through every vertex and triangle in the mesh and use them to create nodes and portals.

To be able to raycast onto the navmesh we also had to save away the triangles, the navigation nodes’ positions are made from the averaged position of all vertices in that triangle, and any edges that connect to other triangles become portals.

After a lot of testing and fixing, we could now run around an actual level with a navmesh that had been generated from geometry in Unreal.