Recast graph wont create pathing through Unity terrain hole

Hello!

I can’t seem to get recast graphs to go through holes created by Unity’s terrain hole system. Any ideas?

The red is where the terrain is present

Hi

If there’s a hole, the code will think that the agent cannot move there. You need some other mesh to be included in the scan if you want to patch over the hole.

The ground seen in the photo is a separate mesh from the terrain.

I did try and add a dummy piece on a new layer to bridge the empty section but even adding the new layer to the first recast graph and adding a second recast graph entirely with just the new layer enabled did not seem to work.

Hi

Terrain holes are just represented by the absence of any normal terrain mesh. It shouldn’t prevent you from bridging the gap. Are you sure there isn’t anything else blocking that part of the navmesh?

I am 100% positive. Here is a shot from a brand new scene, on a new terrain with a hole. It does not seem to recognize that the section of terrain is missing.

One thing I forgot to mention. I think I assumed that you were using the beta, but reading your post again, there’s nothing really that indicates this. Terrain holes are only supported in the beta version of the package. So if you are not using the beta, take a look at A* Pathfinding Project

Ah! This is probably the reason. I am only on the pro version. I will switch over and report back. Thanks!

Success! Switched to the beta version and it is working now. Thanks so much!

1 Like