Anyone aware of any sample source code that contain Navigational Meshes?
I'm aware of recast navigation (which is a little bit too complicated). - Written in C++.
Preferably C# but C++ is ok.
closed as off-topic by Krom Stern, Seth Battin, Anko, Josh Petrie♦ Oct 29 '14 at 16:05
This question appears to be off-topic. The users who voted to close gave this specific reason:
I haven't really used Navigation Meshes extensively yet, but from your reply, since you're only looking at how to generate the nodes and traverse it, I would do it the following way.
Firstly, to generate the nodes in the navigation graph, I'd iterate through all the quads in the mesh and add them to a graph appropriately.
That's a fairly simple brute-force method, but there's probably better methods out there.
To traverse the created graph simply make use of A* (A* Algorithm). This will give you a higher level path (a path from quad-to-quad).
Then to pathfind within each quad you can use a simple steering behaviours towards the next quad or even A* again to find the shortest-path (if you've got obstacles in the way).
Not sure if that's been explained very well, but it's a very high level look at it.
Hope it helps.