[NEW] Navigation plugin for babylon.js [Node/Browser][ES6][Single thread/Worker/WASM]

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 :crazy_face: 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.

7 Likes

Awesome :open_mouth: thank you for sharing!

1 Like

@roland It looks awesome as the version provided by babylon.js (npm package recast-detour afaik) is generated from an old version of recast navigation (2021) but…

This repo is no longer maintained and now is a part of the babylon.js ADDONS.

And I can’t find it in the addons here or here

What’s the status?

1 Like

Hey!
The new navigation add-on is almost ready for prime time. If all goes well, you should see it drop as soon as next week.

Right now I’m wrestling with the UMD build (the ES6 build is already running smoothly), but once that’s sorted, it’s good to go.

Keep an eye on the Announcements category… That’s where the official release news will land.

4 Likes

Sweet :money_mouth_face:

1 Like

If anyone interested:

6 Likes

The new navigation plugin is finally merged and built! :smiling_face_with_sunglasses:
I’m working on the docs and some example PGs. Stay tuned for the announcement!

7 Likes

YEAH!! Congrats dude! That rocks!

1 Like
3 Likes