Navigation
API > API/Runtime > API/Runtime/Navmesh
Description
Builds the distance field for the specified compact heightfield.
This is usually the second to the last step in creating a fully built compact heightfield. This step is required before regions are built using rcBuildRegions or rcBuildRegionsMonotone.
After this step, the distance data is available via the rcCompactHeightfield::maxDistance and rcCompactHeightfield::dist fields.
| Name | rcBuildDistanceField |
| Type | function |
| Header File | /Engine/Source/Runtime/Navmesh/Public/Recast/Recast.h |
| Include Path | #include "Recast/Recast.h" |
| Source | /Engine/Source/Runtime/Navmesh/Private/Recast/RecastRegion.cpp |
bool rcBuildDistanceField
(
rcContext * ctx,
rcCompactHeightfield & chf
)
True if the operation completed successfully.
Parameters
| Name | Remarks |
|---|---|
| ctx | The build context to use during the operation. |
| chf | A populated compact heightfield. |
See Also
-
rcBuildRegions
-
rcBuildRegionsMonotone