- Home /
Does NavMesh.CalculatePath take NavMeshObstacles into account?
My agents seem to be ignoring the NavMeshObstacles I baked in. I am not using NavMeshAgent, but driving my own agent with NavMesh.CalculatePath. Do I need to teach my agent about NavmeshObstacles?
Answer by Rodolfo-Rubens · May 01, 2017 at 02:46 AM
I just stumbled onto this, it looks like you can't use it on Awake/Start, it needs to be after that, I think that the carving of NavMeshObstacles happens after the Awake/Start methods.
I tried the CalculatePath in start and it didn't work, then I tried in Update and it did work (or use it on a constant updating method or wait for the navmeshobstacle gets stationary)!
Your answer
![](https://koobas.hobune.stream/wayback/20220613095053im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
NavMesh "Lines" not showing up on scene when in navmesh bake window 4 Answers
Why do my Navmesh Agents pop through the center axis of the mesh? 0 Answers
GameObject with NavMeshAgent resets rotation when game starts 2 Answers
orienting navmesh to the normal surface of the ground experiences jerky motion 1 Answer
Can I have 2 navmeshes but only have 1 effected by a nav mesh obstacle? 0 Answers