- Home /
Unity 3.5: Is there a way to access a NavMeshAgent's current path?
I'm trying to highlight a NavMeshAgent's path for debugging, but from the documentation there doesn't seem to be a way to access it, as though it's private with no accessors. Is there no way to get at it? Should I just calculate a path to it's current destination and operate on that? If that's the answer, how do I access the scene's NavMesh in code so that I can call CalculatePath?
I'm wondering the same thing. I haven't been able to find any information on how to accomplish either of these things.
Also wondering about this. I would love to be able to project a path onto the terrain.
Answer by Helkus · Jan 20, 2012 at 12:40 AM
You call .SetDestination on your agent and it'll just move there by itself, You can grab a path from the NavMesh and call SetPath on the agent as well.
I found something akin to the script reference here : http://www.unity3dhelp.com/ScriptReference/NavMeshAgent.html And http://www.unity3dhelp.com/ScriptReference/NavMesh.html
Good luck!
Anyone know anything about this www.unity3dhelp.com website? It seems to be hosting Unity 3.5beta documentation and I don't think permission has been sought for that.
just a spam site, now. And 3.5 is out of beta, so the documentation is easy to get at – however it doesn't answer this question
Your answer
Follow this Question
Related Questions
CalculatePath often returns wrong results 0 Answers
Navigation Mesh not working in build 0 Answers
walking through the countryside ? 1 Answer
Navmesh with destructible obstacles 1 Answer