Giter Site home page Giter Site logo

liuhaopen / navigator Goto Github PK

View Code? Open in Web Editor NEW
78.0 6.0 27.0 1.68 MB

This project provides unity scripts to export navmesh data into tile cache files that can be used directly by recastnavigation

C# 0.66% C++ 91.16% C 7.32% CMake 0.54% HTML 0.11% Lua 0.21%
recastnavigation recast navmesh unity3d-plugin

navigator's Introduction

Navigator

本项目提供unity脚本用以导出navmesh数据为recastnavigation可直接使用的tile cache文件

用法

1)先把exporter_for_unity里的文件复制到你的unity项目的随便一个Editor目录下;
2)烘培好NavMesh后通过菜单NavMeshExporter->ExportToNavBin把navmesh数据导出成bin文件,可通过RecastDemo里Load来看看是否正常;

Usage

This project provides unity scripts to export navmesh data into tile cache files that can be used directly by recastnavigation, and export some API for lua.
1)copy files in folder exporter_for_unity to any 'Editor' folder in your unity project;
2)after baked navmesh, then click NavMeshExporter->ExportToNavBin menu to export navmesh data to tile cache bin file, you can load the file in RecastDemo.

TODO

)导出lua接口

Note

)if you want to rebuild exporter_for_unity\NavigatorForUnity.dll, you can run recastnavigation\RecastDemo\Build\vs2015\recastnavigation.sln in windows system, and rebuild the NavigatorForUnity project.
)if you get a error with "fatal error C1083: 无法打开包括文件: “SDL.h”: No such file or directory", you should grab the latest SDL2 development library release from here and unzip it recastnavigation\RecastDemo\Contrib. Rename the SDL folder such that the path recastnavigation\RecastDemo\Contrib\SDL\lib\x86 is valid.

navigator's People

Contributors

liuhaopen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

navigator's Issues

C++项目无法编译,求助

RecastDemo已经可以正常编译了。但是到NavigatorForUnity无法编译。
如下:

Navigator.cpp
NavigatorForUnity.cpp
Generating Code...
dllmain.cpp
Creating library C:\Users\Chris\Documents\Worktable\github\Navigator\recastnavigation\RecastDemo\Build\vs2015\Debug\NavigatorForUnity.lib and object C:\Users\Chris\Documents\Worktable\github\Navigator\recastnavigation\RecastDemo\Build\vs2015\Debug\NavigatorForUnity.exp
Navigator.obj : error LNK2019: unresolved external symbol "struct rcPolyMesh * __cdecl rcAllocPolyMesh(void)" (?rcAllocPolyMesh@@YAPAUrcPolyMesh@@xz) referenced in function "public: static int __cdecl Navigator::ConvertJsonToNavBinFile(char const *,char const *)" (?ConvertJsonToNavBinFile@Navigator@@SAHPBD0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "void * __cdecl dtAlloc(unsigned int,enum dtAllocHint)" (?dtAlloc@@YAPAXIW4dtAllocHint@@@z) referenced in function "public: static class dtNavMesh * __cdecl Navigator::LoadNavMesh(char const *)" (?LoadNavMesh@Navigator@@SAPAVdtNavMesh@@pbd@Z)
Navigator.obj : error LNK2019: unresolved external symbol "void __cdecl dtFree(void *)" (?dtFree@@YAXPAX@Z) referenced in function "public: static int __cdecl Navigator::ConvertJsonToNavBinFile(char const *,char const *)" (?ConvertJsonToNavBinFile@Navigator@@SAHPBD0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMesh::init(struct dtNavMeshParams const *)" (?init@dtNavMesh@@QAEIPBUdtNavMeshParams@@@z) referenced in function "public: static class dtNavMesh * __cdecl Navigator::LoadNavMesh(char const *)" (?LoadNavMesh@Navigator@@SAPAVdtNavMesh@@pbd@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMesh::init(unsigned char *,int,int)" (?init@dtNavMesh@@QAEIPAEHH@Z) referenced in function "public: static int __cdecl Navigator::ConvertJsonToNavBinFile(char const *,char const *)" (?ConvertJsonToNavBinFile@Navigator@@SAHPBD0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: struct dtNavMeshParams const * __thiscall dtNavMesh::getParams(void)const " (?getParams@dtNavMesh@@QBEPBUdtNavMeshParams@@xz) referenced in function "public: static void __cdecl Navigator::SaveNavMesh(char const *,class dtNavMesh const *)" (?SaveNavMesh@Navigator@@SAXPBDPBVdtNavMesh@@@z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMesh::addTile(unsigned char *,int,int,unsigned int,unsigned int *)" (?addTile@dtNavMesh@@QAEIPAEHHIPAI@Z) referenced in function "public: static class dtNavMesh * __cdecl Navigator::LoadNavMesh(char const *)" (?LoadNavMesh@Navigator@@SAPAVdtNavMesh@@pbd@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMesh::getTileRef(struct dtMeshTile const *)const " (?getTileRef@dtNavMesh@@QBEIPBUdtMeshTile@@@z) referenced in function "public: static void __cdecl Navigator::SaveNavMesh(char const *,class dtNavMesh const *)" (?SaveNavMesh@Navigator@@SAXPBDPBVdtNavMesh@@@z)
Navigator.obj : error LNK2019: unresolved external symbol "public: int __thiscall dtNavMesh::getMaxTiles(void)const " (?getMaxTiles@dtNavMesh@@QBEHXZ) referenced in function "public: static void __cdecl Navigator::SaveNavMesh(char const *,class dtNavMesh const *)" (?SaveNavMesh@Navigator@@SAXPBDPBVdtNavMesh@@@z)
Navigator.obj : error LNK2019: unresolved external symbol "public: struct dtMeshTile const * __thiscall dtNavMesh::getTile(int)const " (?getTile@dtNavMesh@@QBEPBUdtMeshTile@@h@Z) referenced in function "public: static void __cdecl Navigator::SaveNavMesh(char const *,class dtNavMesh const *)" (?SaveNavMesh@Navigator@@SAXPBDPBVdtNavMesh@@@z)
Navigator.obj : error LNK2019: unresolved external symbol "class dtNavMesh * __cdecl dtAllocNavMesh(void)" (?dtAllocNavMesh@@YAPAVdtNavMesh@@xz) referenced in function "public: static int __cdecl Navigator::ConvertJsonToNavBinFile(char const *,char const *)" (?ConvertJsonToNavBinFile@Navigator@@SAHPBD0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "void __cdecl dtFreeNavMesh(class dtNavMesh *)" (?dtFreeNavMesh@@YAXPAVdtNavMesh@@@z) referenced in function "public: virtual __thiscall Navigator::~Navigator(void)" (??1Navigator@@UAE@XZ)
Navigator.obj : error LNK2019: unresolved external symbol "public: __thiscall dtQueryFilter::dtQueryFilter(void)" (??0dtQueryFilter@@QAE@XZ) referenced in function "public: int __thiscall Navigator::findRandomPointAroundCircle(float *,float,float *)" (?findRandomPointAroundCircle@Navigator@@QAEHPAMM0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMeshQuery::init(class dtNavMesh const *,int)" (?init@dtNavMeshQuery@@QAEIPBVdtNavMesh@@h@Z) referenced in function "public: int __thiscall Navigator::init(char const *)" (?init@Navigator@@QAEHPBD@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMeshQuery::findNearestPoly(float const *,float const *,class dtQueryFilter const *,unsigned int *,float *)const " (?findNearestPoly@dtNavMeshQuery@@QBEIPBM0PBVdtQueryFilter@@PAIPAM@Z) referenced in function "public: int __thiscall Navigator::findRandomPointAroundCircle(float *,float,float *)" (?findRandomPointAroundCircle@Navigator@@QAEHPAMM0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMeshQuery::findRandomPointAroundCircle(unsigned int,float const *,float,class dtQueryFilter const ,float (__cdecl)(void),unsigned int *,float *)const " (?findRandomPointAroundCircle@dtNavMeshQuery@@QBEIIPBMMPBVdtQueryFilter@@P6AMXZPAIPAM@Z) referenced in function "public: int __thiscall Navigator::findRandomPointAroundCircle(float *,float,float *)" (?findRandomPointAroundCircle@Navigator@@QAEHPAMM0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "class dtNavMeshQuery * __cdecl dtAllocNavMeshQuery(void)" (?dtAllocNavMeshQuery@@YAPAVdtNavMeshQuery@@xz) referenced in function "public: int __thiscall Navigator::init(char const *)" (?init@Navigator@@QAEHPBD@Z)
Navigator.obj : error LNK2019: unresolved external symbol "void __cdecl dtFreeNavMeshQuery(class dtNavMeshQuery *)" (?dtFreeNavMeshQuery@@YAXPAVdtNavMeshQuery@@@z) referenced in function "public: virtual __thiscall Navigator::~Navigator(void)" (??1Navigator@@UAE@XZ)
Navigator.obj : error LNK2019: unresolved external symbol "bool __cdecl dtCreateNavMeshData(struct dtNavMeshCreateParams *,unsigned char * *,int *)" (?dtCreateNavMeshData@@YA_NPAUdtNavMeshCreateParams@@PAPAEPAH@Z) referenced in function "public: static int __cdecl Navigator::ConvertJsonToNavBinFile(char const *,char const *)" (?ConvertJsonToNavBinFile@Navigator@@SAHPBD0@Z)
C:\Users\Chris\Documents\Worktable\github\Navigator\recastnavigation\RecastDemo\Build\vs2015\Debug\NavigatorForUnity.dll : fatal error LNK1120: 19 unresolved externals

不是太懂c++,真心求助。

java.io.ioexception invalid magic error while loading .bin file in recast4j

HI
I got the nav mesh stored as tiled cache in .bin file, but when loading it back in recast4j using MeshsetReader i am getting java. java.io.ioexception invalid magic error
I want to load it back to recast4j java for finding path
And any other routes to use this .bin file to find path from src to dst in java android
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.