Issues creating new area via RecastMeshObj

I am trying to create new areas whenever the player deforms the terrain below the water plane, so that the “water” area has a different area index and tag than the ground area. I am trying to do this via RecastMeshObj. However it is having the opposite effect of what I want, in that it’s making a walkable area below the ground where the water plane is and cutting a hole where the water meets the terrain so the “walkable” water areas are not walkable.

These images should do a better job showcasing what I mean:

The blue area is the default terrain area, and adding a RecastMeshObj created a new (green) area below the ground that is a bit wider than the lake (white plane). I want the opposite effect though, where the white plane area is a new area with a seam matching the default area, so I can assign a different weights to the water so only specific agents can use it, or be less likely to use it vs. a ground only path.

For example, something like this:

Where there would only be the blue & red areas, which have a matching seam.

Is there an easy way to do this?



To make a seam you need to set the area type on the RecastMeshObj to Custom Surface Area.

There is however not yet support for this information making it to the pathfinding stage so that you can set a custom tag.
It’s on my todo list. You can use a GraphUpdateScene component to specify the nodes that you want to change a tag on.

That you get another green part of the navmesh below the regular navmesh is because the water plane extends below the terrain, and you have made the water plane walkable so it thinks it can walk there. To solve this you can either increase the Walkable Height parameter in the recast graph to make sure the character cannot walk in that region because it is too small, or you can trim the water plane to a more complex polygon to make it line up better with the shoreline.

I have been able to get this result: