🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Recast Navigation

Started by
0 comments, last by O-san 12 years, 9 months ago
I figured I would spend a few days working with the Recast Navigation library and wrap the functionality up in some simple classes. I've implemented half a dozen third party libraries in the past with no problems, but I'm finding Recast to be much more difficult than I anticipated. There's no documentation, and the example provided has the pathfinding code mixed up with rendering, .obj file loading, and a GUI, so I can't tell what anything is doing.

Are there any tutorials or documentation, or just an explanation of what commands to call for this library, anywhere? I don't have any specific questions, I just can't tell how to even get started. Any information you can provide would help, thanks.

10x Faster Performance for VR: www.ultraengine.com

Advertisement
Sorry for the late reply, I had this problem also, found no tutorials or anything. My best tip is to read through the example code, I found it not so difficult once I got started. Look through Sample_StatMeshSimple.cpp especially the function bool Sample_StatMeshSimple::handleBuild(), it is quite well commentated.

I build my nav mesh from a waveobj memory buffer instead of an actual file. I generate this buffer from my geometry. I then load the buffer using the existing methods rcMeshLoaderObj::addVertex rcMeshLoaderObj::addTriangle. The resulting mesh needs to have it's bounds calculated before the nav mesh can be built from it:

rcCalcBounds(mMesh->getVerts(), mMesh->getVertCount(), mMeshBMin, mMeshBMax);

Lastly I build the navigation mesh using my own handleBuild function which is quite similar to Sample_StatMeshSimple::handleBuild().

This topic is closed to new replies.

Advertisement