How to stop NavMeshAgent from using an area?
Hello,
I have two NavMeshAgents: Person and Car. I have my terrain and on it are two navigation areas that I set in the layers; Foothpath and road. I have checkpoints (gameobjects) dotted around the area so that the Person-object can walk around the area. I did the same for the Car. The problem is that sometimes my Car would use the Footpath since that has a lower area cost.
Is there a way to restrict a NavMeshAgent's walking area?
Thanks
Answer by Tareq_tsc · Sep 01, 2016 at 12:56 PM
Fixed it in the end; the NavMeshAgent component as a field called Area Mask, which has the list of areas that I have defined. I just have to uncheck the ones that I don't want the agent to use and it'll avoid using them. I just need to redo the costs per path though.
Your answer
Follow this Question
Related Questions
Forcing NavMeshAgent to follow Parallel to the player 0 Answers
NavMesh Agent won't move 1 Answer
NavMeshAgent and narrow paths 0 Answers
Use NavMesh to traverse a random path 0 Answers
Object reference not set to an instance of an Object? 0 Answers