I found the function what does exactly what I need:
bool ARecastNavMesh::ProjectPointMulti(const FVector& Point, TArray<FNavLocation>& OutLocations, const FVector& Extent,
float MinZ, float MaxZ, FSharedConstNavQueryFilter Filter, const UObject* QueryOwner) const
There is the example of usage:
void UEnvQueryGenerator_VolumetricGrid::NavigationRaycast(TArray<FNavLocation>& Points, const FVector& Position, FEnvQueryInstance& QueryInstance) const
{
const UObject* Querier = QueryInstance.Owner.Get();
const ANavigationData* NavData = nullptr;
NavData = FEQSHelpers::FindNavigationDataForQuery(QueryInstance);
const ARecastNavMesh* NavMeshData = Cast<const ARecastNavMesh>(NavData);
if (NavMeshData == nullptr || Querier == nullptr)
{
return;
}
FSharedConstNavQueryFilter NavigationFilter = UNavigationQueryFilter::GetQueryFilter(*NavData, Querier, ProjectionData.NavigationFilter);
TArray<FNavLocation> HitLocations;
const FVector ProjectionExtent(ProjectionData.ExtentX, ProjectionData.ExtentX, (ProjectionData.ProjectDown + ProjectionData.ProjectUp) / 2);
NavMeshData->ProjectPointMulti(Position, HitLocations, ProjectionExtent, Position.Z - ProjectionData.ProjectDown, Position.Z + ProjectionData.ProjectUp, NavigationFilter, Querier);
for (int32 HitIdx = 0; HitIdx < HitLocations.Num(); HitIdx++)
{
Points.Add(HitLocations[HitIdx]);
}
}