Hi everyone,
We’re excited to announce that the Navigation Plugin V2 has just landed in Babylon.js ADDONS! ![]()
This new version is built on top of the excellent recast-navigation-js library by Isaac Mason. It’s fully ES6-compliant, modern, and actively maintained — a big step forward from the legacy V1 implementation.
Why V2?
- V1 relies on an outdated JS package that often breaks with ES6 and bundlers. V1 is going to be deprecated in the future.
- V2 uses
recast-navigation-jsunder the hood, offering better compatibility, stability, and performance. - V2 will eventually replace V1 after more testing, but you can already switch over easily — the interface is 100% compatible.
There is only one difference: V2 must be initialized with an async factory function instead of a constructor.
const navigationPlugin = await ADDONS.CreateNavigationPluginAsync(); // WASM under the hood
const navigationPlugin = await ADDONS.CreateNavigationPluginWorkerAsync(); // Worker version not yet supported, coming soon
What’s New in V2?
While keeping everything you know from V1, V2 adds a lot of powerful new tools and options:
New Navigation Mesh Parameters
V2 introduces more fine-tuning when generating a navmesh:
{
offMeshConnections: IOffMeshConnection[],
keepIntermediates: boolean,
maxObstacles: number,
expectedLayersPerTile: number,
tileCacheMeshProcess: TileCacheMeshProcess
}
These unlock advanced features like dynamic obstacles, jump links, and debug visualization.
Per-query Options
Most plugin functions now accept an options object to tweak behavior per-call:
options?: {
filter?: QueryFilter;
halfExtents?: IVector3Like;
// …more depending on function
}
This allows you to define agent-specific filtering and behaviors on the fly.
OffMeshConnections
Custom connections between points on the mesh, useful for:
- Teleports
- Jump links
- One-way passages
Exposed Internals (for advanced use cases)
After creating a navmesh, you can now directly access:
- navMesh (core mesh)
- navMeshQuery (primary interface for queries & pathfinding)
- tileCache (dynamic obstacles & updates of tile parameters)
- intermediates (debugging & visualization)
Navigation Debugger
A brand-new interactive debugger overlay to:
- Inspect navmesh tiles & layers
- Visualize off-mesh connections
- See intermediate build data (with
keepIntermediates: true) - Tune parameters and immediately understand agent behavior
Raycasting & Path Utilities
- Use
navigationPlugin.raycast(start, end)for line-of-sight queries. - Apply new helper functions to post-process paths (L-shaped corners, smooth curves, etc.).
NavMesh generator beta
An interactive visual tool that lets you:
- Fine-tune navmesh parameters directly on your scene meshes
- Instantly preview the results
- Export the navmesh as a compact binary file for lightning-fast production loads
Wrap-up
Navigation Plugin V2 is designed to be drop-in compatible for most existing use cases while offering deeper control, debugging, and performance improvements.
We’d love for you to try it out, share your feedback (you can directly tag me in your post), and help us battle-test it!
If you’re using V1 today, migrating should be straightforward. Give V2 a spin and let us know how it works in your projects!
You can already enjoy and try out Navigation Plugin V2 directly in the Babylon.js Playground!
The ES6 docs are under construction, and I’m actively preparing more example Playgrounds to showcase advanced scenarios and best practices — stay tuned!
Check out the docs:
Special thanks goes to @Cedric @ryantrem @RaananW @Deltakosh and to Isaac for the recast-navigation-js library!
Another chain shattered, another limit broken. The Force does not guide me… it obeys me.

