Skip to content

Configuration Parameters

Wyatt Gillette edited this page Dec 5, 2024 · 2 revisions

Configuration Parameters

It is important to understand the various configuration parameters that effect the final result before moving on to details for each stage of mesh generation. This page provides functional descriptions of all configuration parameters used by the NavMeshGenerator classes, how they impact the final result, and how they impact each other.

  1. Cell Size and Height:

    • setCellSize: Determines the size of the grid cells used to sample the environment.
    • setCellHeight: Sets the height of the grid cells.
  2. Traversability:

    • setMinTraversableHeight: Specifies the minimum height for traversable areas.
    • setMaxTraversableStep: Sets the maximum height of steps that can be traversed.
    • setMaxTraversableSlope: Defines the maximum slope angle for traversable surfaces.
    • setClipLedges: Controls whether ledges are considered traversable or not.
  3. Region Generation:

    • setTraversableAreaBorderSize: Sets the minimum distance between traversable areas and obstacles.
    • setSmoothingThreshold: Controls the level of smoothing applied to the distance field.
    • setUseConservativeExpansion: Enables conservative expansion to prevent malformed regions.
    • setMinUnconnectedRegionSize: Sets the minimum size for unconnected regions.
    • setMergeRegionSize: Specifies the minimum size for regions to be merged.
  4. Mesh Generation:

    • setMaxEdgeLength: Limits the length of polygon edges.
    • setEdgeMaxDeviation: Controls the maximum deviation of mesh edges from the source geometry.
    • setMaxVertsPerPoly: Sets the maximum number of vertices per polygon.
    • setContourSampleDistance and setContourMaxDeviation: Configure the sampling and deviation parameters for detail mesh generation.
  5. Performance:

    • setTimeout: Sets a timeout for the generation process.
  6. Intermediate Data:

    • setIntermediateData: Assigns an intermediate data object for storing temporary data during the generation process.
Clone this wiki locally