- Home /
Overlapping NavMesh area types makes it impassable for some agents
I'm working on a 2D plane (along XZ) with with some agents set to be able to walk along the ground, and others set to be able to float/fly cross the air and voids between areas of ground.
As a simplified model of how I represent this, I have the "ground" areas set up as various restricted areas such as islands and bridges, and one extremely large quad representing the "air" over the whole stage.
Agents that move on the ground can only move on ground areas, whereas agents that can move in the air can move on both ground and air areas.
This seemed like an intuitive solution to me at first because ground entities will be stuck on the ground, but air entities will have access to everywhere.
However, a problem arises: ground entities don't seem to be able to move because their area is overlapped by air which is invalid, despite them being in a valid area.
I had considered having no air mesh and allowing air entities to move freely, only looking for the nearest ground area when approaching land, but seems like it would have strange problems when searching for a position to move to if there are obstacles near the edges of the ground areas or navigating between ground areas that would have a shorter path via the air.
What I'm looking for is a simple way of expressing that ground entities can move anywhere on the ground but not through obstacles and voids/cliffs/pits, but air entities can move anywhere but not through obstacles.
How should I go about addressing this problem?
EDIT: Formatting, and also...
I have tested the situation such that air entities can only move on the air NavMesh sections and ground entities can only move on the ground NavMesh section (e.g. their masks are non-intersecting), and somehow the air entities are allowed to move on the ground areas and air areas, but the ground entities are not allowed to move at all.
Your answer
Follow this Question
Related Questions
Unity Navagation Ground Mapping 1 Answer
NavMeshAgent not fully reaching destination, thus it won't delete itself when it gets there 1 Answer
Get NavMeshAgents (Enemies) to not bunch up together 3 Answers
How would I simulate a rectangular Nav Mesh Agent? 0 Answers
how to modify values of automatically generated offMesh link? 0 Answers