Recast Navmesh Generation with Playcanvas Editor

By using Websocket and RecastCLI on NodeJS, you can generate your navmeshes from entities containing collision-related components within your Playcanvas scene easily.

Here’s the repository:

The readme contains example project link and instructions.

Here’s a screenshot of it being used in an indoor scene.(Warehouse)


Added basic navmesh path testing using ThreeJS pathfinding engine.

1 Like

For Warehouse Walk, I switched out the threejs navmesh to use Yuka framework which includes a far better navmesh ( Ngons) and other ai behaviours/features, including my own custom gridless flowfield behaviour algorithm implementation on top of it . This will be something that I have yet to replace I in the SketchFab project as well .

Here’s a demo of the gridless flowfield algorithm I was talking about. ( note : not fully optimised but works fairly ok on mobile)

A setup with other Yuka behaviours for flocking and integration with 2 physic collision options. The demo is mobile friendly and runs with static environment collision detection only without using ammojs physics and thus runs smoothly on mobile device unlike various emscripten ports of Detour I’ve seen. On desktop , Warehouse Walk editor has 2 test scenes with 100+ agents running smoothly on either AmmoJS ( Playcanvas default physics) full collisions including among agents vs ( my own custom static environment collision checking physics) only . Hmm… this might now be my goto solution for 3D crowd movement/navigation in JS. However, I admit it’s not close to an enduser friendly out of a box solution, but involves integrating various stuffs together. ( which is correct approach, anyway, never liked monolithic engines that try to do everything ). tip: save mobile performance and download size by exporting your build without loading Playcanvas physics, if you aren’t using it.

Regarding the flowfield movement, I haven’t added the fine tuning feature to navigate sharp corners better , but as of now it seems pretty good enough atm. There might be janky collision/teleportation issues but but that’s has nothing to do with the flowfield navigation algorithm itself.

I think where this might be useful is a tower Defense game that encompasses large distances…or dynasty warrior/zombie kind of large levels.

1 Like