Changing tags for roads?

Hi.

I am setting a recast graph up for a very large world. Seems to work okay except I want to be able to set penalties so that the agent uses roads more than going over hills/fields etc.

To do this I simply want to tag all my roads as ‘road’ and the terrain as ‘off-road’. However when I try and set the tag of the roads it creates a giant rectangle around each of them. Is there a way to fit the area to the mesh of the road? I have nearly 1600 roads so I don’t really want to manually set the area for each

Aron will correct me if i’m wrong but i think the answer is no. Recast is creating a voxelised version of your terrain and so it sort of loses this data.

We use recast for a big a terrain and AFAIK you can’t really use them or penalties in the same way as you can for a grid graph.

I have paths in my game and my plan is to have a node graph for the paths and to use that as well as recast, a sort of blend of the two.

Could you direct me to part of the documentation that shows how you can combine graphs for something like that?

Would that allow you to do something like road prioritization?

Hi

It is actually possible to mark roads with a particular tag. However, this requires that the roads have their own mesh, and that you use a somewhat recent version of the beta.

The way to do this is using the RecastMeshObj component. If you use the beta, this component has an option to set the tag for the part of the navmesh that lies on top of the object (adding a seam in the navmesh there, as necessary).

Thanks. I will take a look at the beta!