Mugen87 / yuka

JavaScript library for developing Game AI.
https://mugen87.github.io/yuka/
MIT License
1.1k stars 90 forks source link

How to generate NavMesh automatically? #72

Closed yangfengzzz closed 1 year ago

yangfengzzz commented 1 year ago

I'm just start to learn game AI. Is there any methods in the lib to create NavMesh from a glb automatically? or Is there other tools I should use to create these navmesh?

Mugen87 commented 1 year ago

Yuka does not yet support automatic navigation mesh generation.

I have used Blender in the past to generate navigation meshes from the imported geometry. Unfortunately, this feature as well as the entire game engine was deprecated with 2.8. So you have to use a version < 2.8.

If you don't want to fallback to earlier Blender versions, you can still create the navigation mesh's geometry by hand.

yangfengzzz commented 1 year ago

THX, I found Unity use https://github.com/recastnavigation/recastnavigation to generate the navMesh, Maybe I can try to compile it by using WebAssembly.

Mugen87 commented 1 year ago

Would be interesting to see if this works 👍 .

However, the long term goal is to write a simple nav mesh generator with JS from scratch. We just did not have the bandwidth so far to start with this task.