Across an L of five cells the funnel collapses the route to a single bend that hugs the reflex inner corner - the shortest taut path, not the cell-centre zig-zag.
Navigation mesh
This is a navigation-mesh pathfinder written in plain C# from the GameDevelopment.NavMesh leaf. It runs A* across a graph of convex cells, then a funnel - the simple stupid funnel algorithm - string-pulls the corridor, tightening it into a single taut path that hugs inner corners. The result is not the cell-centre zig-zag but the shortest polyline that stays inside the walkable mesh. Deterministic, analytic, and with zero dependencies on the .NET base library.
Across an L of five cells the funnel collapses the route to a single bend that hugs the reflex inner corner - the shortest taut path, not the cell-centre zig-zag.
An open room with a solid block in the middle; A* routes around it and the funnel pulls the path tight against the obstacle's corner.
Staggered walls force a longer route; the string-pull still yields one continuous taut path from start to goal.
The mesh is a set of convex cells joined by shared-edge portals; A* finds the sequence of cells, then the funnel algorithm walks the portal left/right vertices, tightening an apex so the final path is the shortest polyline that stays inside the walkable cells - bending only at inner corners. All analytic geometry in plain C# on the base library, fully deterministic.