Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    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:
    24
    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?