NavMesh based navigation and pathfinding plugin for MacroQuest2. Navigation is based on the RecastNavigation library. The plugin also includes an ingame overlay to display navigation meshes as well as a debugging UI provided by imgui.
This project consists of two parts: The MQ2 Plugin (MQ2Nav.dll), and the Mesh Generator (MeshGenerator.exe)
The MeshGenerator tool is used for generating and editing the properties of navmeshes
- See the wiki for some screenshots and features
- Visual Studio 2019
MQ2Nav is a unique plugin. You do not want to add it to your solution. Instead you will build it in a separate solution apart from MacroQuest2.sln.
- Check out the sources into /MQ2Nav. MQ2Nav should be next to MQ2Main, etc.
- Open MacroQuest2.sln and build
- Open MQ2Nav\MQ2Nav.sln and select the configuration (most people will want Release)
- build MQ2Nav.dll: select the Win32 architecture and build
- build MeshGenerator.exe: select the x64 architecture and build
The first time you build, you'll download some NuGet packages.
The outputs will go into your Release (or Debug, depending on your selected configuration) folder.
This plugin makes use of the following libraries:
Contributions are welcome! Feel free to open pull requests or report issues.
TODO
See the wiki for more info
Loading into a zone with MQ2Nav loaded will generate a config file with a list of dynamic objects that can be consumed by MeshGenerator to add that extra geometry to the navmesh. These kinds of objects include some POK stones, for example. Doors are filtered out of the list, but there may be some false positives.
Some things to do. Eventually move these to issues...
- Split overlay code out into its own plugin
- Better path planning
- Switch to TileCache implementation (for dynamic obstacle support)
- Render paths with MQ2Map
- Improved door opening behavior
- Some tiles generate incorrectly using MeshGenerator (duplicate or missing)