RecastGraph with Custom Terrain

Hey I`m searching a way to scan custom terrain using recast graph. My terrain is still using Unity built in TerrainData ( mainly for heightmap collider) and as I see in code A* that terrain scan mostly relies on this so it should be possible.

Is there any public function to injecting custom heights/holes array into the scanning process ? Like in this one ?:

In Theory, i could convert my terrain to mesh and then paste it to scanner as regular mesh However i need to do runtime terrain modification and this might be overkill to store the whole terrain mesh copy etc.

Thanks in advance for any help/tips.

Support for Unity built-in TerrainCollider might also solve the case

Hi

Currently, this is not possible out of the box, I’m afraid. You’d have to modify the code for RecastMeshGatherer.

kk,

Is there any chance you may add this option in future updates ?

Hi

In the next version I’ll include a callback in RecastGraph.collectionSettings.onCollectMeshes. This can be used to add custom meshes for rasterization.

1 Like

This will definitely help me. Thanks!