This paper proposes an A* artificial intelligence pathfinding algorithm based on the hexagonal grid map of Unreal Engine 5. This algorithm utilizes the rich tools and resources provided by Unreal Engine 5 to evaluate each node through a heuristic function, thus finding the shortest path. Test results show that this algorithm not only can quickly find the shortest path, but also can effectively avoid obstacle grids, with advantages such as high efficiency, flexibility, and scalability. This research result has high practical value for solving pathfinding problems on hexagonal grid maps and can ...