• Advertisement
Sign in to follow this  

Recast Navigation

This topic is 2301 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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 [b]Sample_StatMeshSimple.cpp[/b] especially the function [b]bool Sample_StatMeshSimple::handleBuild()[/b], 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().

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement