Sorry Guys, a dumb question, but I simply cannot figure out the issue here:
I have a simple object with a navmesh agent attached to it. On the ground there is the regular terrain and 2 quads (having baked surface brown and surface green). The navmesh agent gets a waypoint and moves straight to the destination, although he should ignore surface green:
Actually the agent should use the red path around the green nav surface. The green nav surface slightly overlaps the brown one. Before the waypoint is assigned the navagent areacost was lifted to 9999 for the green surface so that he avoids it. The areamask is at -1 (all).
Height levels:
- terrain = 10.498
- brown surface = 10.50
- green surface = 10.55
- navmesh agent when crossing = 10.78 (manually height adjusted to be on top)
Agent type is matching of course and using the standard agent settings:
Doing a NavMesh.SamplePosition obviously recognizes the 3 surfaces once on it, but no effect on movement. Also tried to exclude the green one from the areamask, but it seems also here the next lower one (the brown one) is obviously taken. But no way to exclude the green.
Any help would be appreciated!
PS.: the actual idea here was to calculate navmesh surfaces, and depending which unit type gets a path, some may pass, some may not move through.