var agentHeight: Double
The minimum floor to ceiling height that will still allow the floor area to be considered walkable.
var agentMaxClimb: Double
The minimum ledge height that is considered to still be traversable.
var agentMaxSlope: Double
The maximum slope that is considered walkable, in degrees.
var agentRadius: Double
The distance to erode/shrink the walkable area of the heightfield away from obstructions.
var cellHeight: Double
The cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height on the navigation map.
var cellSize: Double
The cell size used to rasterize the navigation mesh vertices on the XZ plane. Must match with the cell size on the navigation map.
var detailSampleDistance: Double
The sampling distance to use when generating the detail mesh, in cell unit.
var detailSampleMaxError: Double
The maximum distance the detail mesh surface should deviate from heightfield, in cell unit.
var edgeMaxError: Double
The maximum distance a simplified contour’s border edges should deviate the original raw contour.
var edgeMaxLength: Double
The maximum allowed length for contour edges along the border of the mesh. A value of 0.0
disables this feature.
var filterBakingAabb: AABB
If the baking AABB
has a volume the navigation mesh baking will be restricted to its enclosing area.
var filterBakingAabbOffset: Vector3
The position offset applied to the filterBakingAabb
AABB
.
var filterLedgeSpans: Bool
If true
, marks spans that are ledges as non-walkable.
var filterLowHangingObstacles: Bool
If true
, marks non-walkable spans as walkable if their maximum is within agentMaxClimb
of a walkable neighbor.
var filterWalkableLowHeightSpans: Bool
If true
, marks walkable spans as not walkable if the clearance above the span is less than agentHeight
.
var geometryCollisionMask: UInt32
The physics layers to scan for static colliders.
var geometryParsedGeometryType: NavigationMesh.ParsedGeometryType
Determines which type of nodes will be parsed as geometry. See ParsedGeometryType
for possible values.
var geometrySourceGeometryMode: NavigationMesh.SourceGeometryMode
The source of the geometry used when baking. See SourceGeometryMode
for possible values.
var geometrySourceGroupName: StringName
The name of the group to scan for geometry.
var regionMergeSize: Double
Any regions with a size smaller than this will be merged with larger regions if possible.
var regionMinSize: Double
The minimum size of a region for it to be created.
var samplePartitionType: NavigationMesh.SamplePartitionType
Partitioning algorithm for creating the navigation mesh polys. See SamplePartitionType
for possible values.
var vertices: PackedVector3Array
var verticesPerPolygon: Double
The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process.
func addPolygon(PackedInt32Array)
Adds a polygon using the indices of the vertices you get when calling getVertices()
.
func clear()
Clears the internal arrays for vertices and polygon indices.
func clearPolygons()
Clears the array of polygons, but it doesn’t clear the array of vertices.
func createFromMesh(Mesh?)
Initializes the navigation mesh by setting the vertices and indices according to a Mesh
.
func getCollisionMaskValue(layerNumber: Int32) -> Bool
Returns whether or not the specified layer of the geometryCollisionMask
is enabled, given a layerNumber
between 1 and 32.
func getPolygon(idx: Int32) -> PackedInt32Array
Returns a PackedInt32Array
containing the indices of the vertices of a created polygon.
func getPolygonCount() -> Int32
Returns the number of polygons in the navigation mesh.
func setCollisionMaskValue(layerNumber: Int32, value: Bool)
Based on value
, enables or disables the specified layer in the geometryCollisionMask
, given a layerNumber
between 1 and 32.