3d导航寻路react-navigation

cocos版本react-navigation,用babylon.js的寻路版本修改而来
demo:http://zhang_yizhang.gitee.io/extensions/recastjs/demo/build/web-mobile/

参考链接
https://github.com/zhangyizhang/Extensions/tree/cocos
https://github.com/BabylonJS/Extensions
https://github.com/recastnavigation/recastnavigation/tree/c40188c796f089f89a42e0b939d934178dbcfc5c
https://github.com/emscripten-core/emscripten

17赞

大神,开源DEMO代码学习下

https://github.com/zhangyizhang/Extensions/tree/cocos/recastjs/demo

1赞

mark,

谢谢你的分享

我拖到项目里就运行不起来

好兄弟,有没有兴趣发个NPM

mark!!!

大佬orz

发布了,npm install cocos-recast

1赞

需要改成插件脚本,或者使用npm

Mark!

十分感谢!

寻路不能下楼啊

下楼梯可以改角色的爬楼梯高度,或者添加台阶之间的link

我们目前用的是3.1.1版本 能否升级到这个版本使用呢

目前3.1版本使用没问题

Uncaught (in promise) TypeError: (f | 0) is not a function
at de (recast.js:19)
at Yg (recast.js:19)
at Bo (recast.js:15)
at Rq (recast.js:15)
at Nu (recast.js:31)
at Module._emscripten_bind_NavMesh_build_6 (recast.js:45)
at NavMesh.build.NavMesh.build (recast.js:45)
at RecastJSPlugin.createNavMesh (recastJsPlugin.js:118)
at Function._callee$ (RecastDetourManager.ts:137)
at tryCatch (runtime.js:43)

这么调用的
RecastDetourManager.getInstanceByNode(node, this.debugMate, Layers.Enum.DEFAULT, this.node).then((mgr) => {

            this.recastDetourManager = mgr

        })

更新cocos-recast这个包试试

去那里更新 我用的是你demo中的这个库 而且这个我本地运行你的demo是正常的