Hey guys!
There are dozens of topics asking for help to make the navigation running and in many cases you need to use ridicolous hacks to get it running. The problems are in the recast/detour js implmentation not in the plugin shipped in the babylon.js libraries.
There is HOPE and now it comes from the dark side Simply follow the 3 steps instructions (README.MD/How to use the plugin in your project).
This implementation uses the recast-navigation-js
npm packge instead of recast-js
. The babylon.js plugin needed to be rewritten to use the new npm package.
The interface didn’t change just the implementation so you don’t have to change your client code:
class RecastNavigationJSPlugin implements INavigationEnginePlugin
The plugin is fully (should be) compatible with the original plugin shipped in the babylon.js libs. It also should work with all bundlers (vite tested) and in browser environments as well. I didn’t test everything however I already started to use this plugin in my projects and didn’t encounter any issues yet.