rcBuildDistanceField

Builds the distance field for the specified compact heightfield.

Windows
MacOS
Linux

References

Module

Navmesh

Header

/Engine/Source/Runtime/Navmesh/Public/Recast/Recast.h

Include

#include "Recast/Recast.h"

Source

/Engine/Source/Runtime/Navmesh/Private/Recast/RecastRegion.cpp

Syntax

bool rcBuildDistanceField
(
    rcContext * ctx,
    rcCompactHeightfield & chf
)

Remarks

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](API\Runtime\Navmesh\Recast\rcCompactHeightfield\maxDistance) and rcCompactHeightfield::dist fields.

Returns

True if the operation completed successfully.

Parameters

Parameter

Description

ctx

The build context to use during the operation.

chf

A populated compact heightfield.

See Also

rcCompactHeightfield

rcBuildRegions

rcBuildRegionsMonotone

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss