NavMesh Generator


This is something that I've quite proud of for programming. With the help of the CritterAI NavMesh Library, I was able to make a nav mesh for the game I was involved in, StealthSmash. It took quite a while to sort through the documentation (which was sometimes outdated and caused as many problems as it solved), but I was able to consolidate the main parts of the code needed for making either a single tile nav mesh OR a multiple tile nav mesh, into one class that is easily plugged into C# projects.
Critter AI is based on the C++ Recast/Detour but ported into C# You can find more info and groups/documentation in the following links.

--->CritterAI Google Group<---
--->CritterAI Documentation<----

How To Use

How To Use:
1. Extract the files where you want to use them in your project and add them etc.
2. When you have your project set up, You make an object of the NavMeshGenerator and pass a path to the obj that you would
like to base your navmesh on. 
3. Store your navmesh in a NavMesh object from the library (using org.critterai.nav;) and call ConstructNavMesh if your obj
isn't much larger than 1024 in size  OR  you can call ConstructMultiTileNavMesh and fill in the parameters.
The ones that I used were 500 (tile size), 45.5f (angle for max slope), 5 (for max amount of sides on the polygons it generates)

The Generator is automatically setup to save a bin version of the Navmesh it bakes to the same location as the obj 
but with the .bin file type. It will always check to see if there is a .bin version of the obj to load instead of 
rebaking each time the program is launched. This saves you a lot of time when using the library and class. 

Example Code:
//process and load the navmesh
_navMeshGenerator = new NavMeshGenerator(_levelDescriptor.CollisionMeshFile, _graphicsDevice, _camera);
_navMesh = _navMeshGenerator.ConstructMultiTileNavMesh(500, 45.5f, 5);

This example code is for xna 4.0 (hence the _graphics device etc which is needed for any debug drawing etc same with camera)
The extra parameters besides the string is completely optional unless you want to add in debug drawing. Mine was not working
completely correctly so I did not include it in this file. 

The library also has a crowd Manager in it that can be used directly on the nav mesh or other methods provided for just doing
your own ai on the navmesh. 

Happy trails. 


**Disclaimer** This class is made and maintained/updated by Travis Evashkevich and is free to use in any projects. If you have questions about the NavMeshGenerator class itself you can contact me, if you have questions about the library, you can find the googlegroup here--->CritterAI Google Group<--- and the documentation here CritterAI Documentation I take no responsibility for loss of work, data, time, life or anything else that could occur while using the class, not that anything like that should occur.