Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question make nav mesh obstacles ignore certain layers

Discussion in 'AI & Navigation Previews' started by camerondus, Feb 5, 2022.

  1. camerondus

    camerondus

    Joined:
    Dec 15, 2018
    Posts:
    46
    the project im currently prototyping has both infantry and tanks. infantry uses navmesh.findnearestedge for finding cover positions. tanks should be able to roll over and destroy infantry cover positions. for the infantry cover positions, im using navmeshobstacles, so that when they are destroyed the infantry cant find them as cover anymore. however, when using the obstacle, the tank agent sees this as an obstacle, since it also carves a hole in the tank navmesh.

    in the NavMeshSurface component script, there is an option to ignore navmesh obstacles. this would completely fix my issue, though i cant seem to expose it in any way. is this feature planned to release soon?