Sign in to follow this  
JoshKlint_34394

Recast Navigation

Recommended Posts

JoshKlint_34394    1440
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
O-san    1900
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this