- Home /
Question by
ailuropoda0 · Dec 15, 2020 at 01:38 AM ·
navmeshagentnav mesh
make Nav Mesh Area walkable or not walkable depending on Agent types?
Hi, I would like to restrict the walkable Nev Mesh Area depending on Nav Mesh Agent types.
For example, I have Nav Mesh Agent A and B, and there are two Nav Mesh Area C and D. I want to make C walkable to A and not walkable to B, and make D walkable to B, but not walkable to A.
Is it possible? Then, how can I implement it?
Comment
Answer by CoughE · Sep 02, 2021 at 02:55 PM
You could assign each area to a different NavMeshArea, and then use https://docs.unity3d.com/ScriptReference/AI.NavMeshAgent-areaMask.html on each agent to make them only able to path in that area.