• Question about nav_mesh
    8 replies, posted
Hello there. So resently, we are finished our map for gamemode which are based around NPCs. And ofcouse we faced problems generating nav_mesh (because its normal). We tried multiple ways, even sounds SDK one. Zero progress so far. So, I had an idea, to use nav_generate_incremental_range and nav_generate_incremental, wiki says that in this case nav wont be connected to main one, but after few tests I found out that this is BS statement, since it both points of incremental points are in range of each other, its actually connecting them automatically. But this is not my question. My question is: For excample if I make like 50% of the map via incremental and then I'il try to use regular "nav_generate" command, would try to generate whole map aswell or it would skip areas which are already done.
nav_generate will discard the whole nav mesh.
Alright got it. And also, is it nessesry for players to have it downloaded if they are playing on our server? Because last time we checked it, nav mesh was downloading on joining. Its a bit of a problem considering our nav file is huge in size.
I don't think its necessary in GMod for it to download.
Navmesh is serverside only.
Open the map in source SDK 2007 and generate it there; it should take ~12 hours to complete but as long as you see the CPU moving in task manager you'll know it's working.
Here's some useful snippets for cleaning up the trash that the generator creates: for k,v in pairs(navmesh.GetAllNavAreas())do     for k,other in pairs(v:GetIncomingConnections())do         other:Disconnect(v)         v:Disconnect(other) -- not sure which one needs to be disconnected so just do both.     end end for k,v in pairs(navmesh.GetAllNavAreas())do     if v:HasAttributes(NAV_MESH_JUMP) or v:HasAttributes(NAV_MESH_CROUCH) then         v:Remove()     end end
Why are you recommending disconnecting incoming connections?
The generator likes to create weird one-way connections between areas which seriously do not need them. Just updated that snippet though because I wasn't checking for one-way.
Sorry, you need to Log In to post a reply to this thread.