Documentation ¶
Overview ¶
Package NavigationMesh provides methods for working with NavigationMesh object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AddPolygon(polygon []int32)
- func (self Instance) AgentHeight() Float.X
- func (self Instance) AgentMaxClimb() Float.X
- func (self Instance) AgentMaxSlope() Float.X
- func (self Instance) AgentRadius() Float.X
- func (self Instance) AsNavigationMesh() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) BorderSize() Float.X
- func (self Instance) CellHeight() Float.X
- func (self Instance) CellSize() Float.X
- func (self Instance) Clear()
- func (self Instance) ClearPolygons()
- func (self Instance) CreateFromMesh(mesh [1]gdclass.Mesh)
- func (self Instance) DetailSampleDistance() Float.X
- func (self Instance) DetailSampleMaxError() Float.X
- func (self Instance) EdgeMaxError() Float.X
- func (self Instance) EdgeMaxLength() Float.X
- func (self Instance) FilterBakingAabb() AABB.PositionSize
- func (self Instance) FilterBakingAabbOffset() Vector3.XYZ
- func (self Instance) FilterLedgeSpans() bool
- func (self Instance) FilterLowHangingObstacles() bool
- func (self Instance) FilterWalkableLowHeightSpans() bool
- func (self Instance) GeometryCollisionMask() int
- func (self Instance) GeometryParsedGeometryType() gdclass.NavigationMeshParsedGeometryType
- func (self Instance) GeometrySourceGeometryMode() gdclass.NavigationMeshSourceGeometryMode
- func (self Instance) GeometrySourceGroupName() string
- func (self Instance) GetCollisionMaskValue(layer_number int) bool
- func (self Instance) GetPolygon(idx int) []int32
- func (self Instance) GetPolygonCount() int
- func (self Instance) RegionMergeSize() Float.X
- func (self Instance) RegionMinSize() Float.X
- func (self Instance) SamplePartitionType() gdclass.NavigationMeshSamplePartitionType
- func (self Instance) SetAgentHeight(value Float.X)
- func (self Instance) SetAgentMaxClimb(value Float.X)
- func (self Instance) SetAgentMaxSlope(value Float.X)
- func (self Instance) SetAgentRadius(value Float.X)
- func (self Instance) SetBorderSize(value Float.X)
- func (self Instance) SetCellHeight(value Float.X)
- func (self Instance) SetCellSize(value Float.X)
- func (self Instance) SetCollisionMaskValue(layer_number int, value bool)
- func (self Instance) SetDetailSampleDistance(value Float.X)
- func (self Instance) SetDetailSampleMaxError(value Float.X)
- func (self Instance) SetEdgeMaxError(value Float.X)
- func (self Instance) SetEdgeMaxLength(value Float.X)
- func (self Instance) SetFilterBakingAabb(value AABB.PositionSize)
- func (self Instance) SetFilterBakingAabbOffset(value Vector3.XYZ)
- func (self Instance) SetFilterLedgeSpans(value bool)
- func (self Instance) SetFilterLowHangingObstacles(value bool)
- func (self Instance) SetFilterWalkableLowHeightSpans(value bool)
- func (self Instance) SetGeometryCollisionMask(value int)
- func (self Instance) SetGeometryParsedGeometryType(value gdclass.NavigationMeshParsedGeometryType)
- func (self Instance) SetGeometrySourceGeometryMode(value gdclass.NavigationMeshSourceGeometryMode)
- func (self Instance) SetGeometrySourceGroupName(value string)
- func (self Instance) SetRegionMergeSize(value Float.X)
- func (self Instance) SetRegionMinSize(value Float.X)
- func (self Instance) SetSamplePartitionType(value gdclass.NavigationMeshSamplePartitionType)
- func (self Instance) SetVertices(value []Vector3.XYZ)
- func (self Instance) SetVerticesPerPolygon(value Float.X)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Vertices() []Vector3.XYZ
- func (self Instance) VerticesPerPolygon() Float.X
- func (self Instance) Virtual(name string) reflect.Value
- type ParsedGeometryType
- type SamplePartitionType
- type SourceGeometryMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.NavigationMesh
A navigation mesh is a collection of polygons that define which areas of an environment are traversable to aid agents in pathfinding through complicated spaces.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AddPolygon ¶
Adds a polygon using the indices of the vertices you get when calling [method get_vertices].
func (Instance) AgentHeight ¶
func (Instance) AgentMaxClimb ¶
func (Instance) AgentMaxSlope ¶
func (Instance) AgentRadius ¶
func (Instance) AsNavigationMesh ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) BorderSize ¶
func (Instance) CellHeight ¶
func (Instance) Clear ¶
func (self Instance) Clear()
Clears the internal arrays for vertices and polygon indices.
func (Instance) ClearPolygons ¶
func (self Instance) ClearPolygons()
Clears the array of polygons, but it doesn't clear the array of vertices.
func (Instance) CreateFromMesh ¶
Initializes the navigation mesh by setting the vertices and indices according to a [Mesh]. [b]Note:[/b] The given [param mesh] must be of type [constant Mesh.PRIMITIVE_TRIANGLES] and have an index array.
func (Instance) DetailSampleDistance ¶
func (Instance) DetailSampleMaxError ¶
func (Instance) EdgeMaxError ¶
func (Instance) EdgeMaxLength ¶
func (Instance) FilterBakingAabb ¶
func (self Instance) FilterBakingAabb() AABB.PositionSize
func (Instance) FilterBakingAabbOffset ¶
func (Instance) FilterLedgeSpans ¶
func (Instance) FilterLowHangingObstacles ¶
func (Instance) FilterWalkableLowHeightSpans ¶
func (Instance) GeometryCollisionMask ¶
func (Instance) GeometryParsedGeometryType ¶
func (self Instance) GeometryParsedGeometryType() gdclass.NavigationMeshParsedGeometryType
func (Instance) GeometrySourceGeometryMode ¶
func (self Instance) GeometrySourceGeometryMode() gdclass.NavigationMeshSourceGeometryMode
func (Instance) GeometrySourceGroupName ¶
func (Instance) GetCollisionMaskValue ¶
Returns whether or not the specified layer of the [member geometry_collision_mask] is enabled, given a [param layer_number] between 1 and 32.
func (Instance) GetPolygon ¶
Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon.
func (Instance) GetPolygonCount ¶
Returns the number of polygons in the navigation mesh.
func (Instance) RegionMergeSize ¶
func (Instance) RegionMinSize ¶
func (Instance) SamplePartitionType ¶
func (self Instance) SamplePartitionType() gdclass.NavigationMeshSamplePartitionType
func (Instance) SetAgentHeight ¶
func (Instance) SetAgentMaxClimb ¶
func (Instance) SetAgentMaxSlope ¶
func (Instance) SetAgentRadius ¶
func (Instance) SetBorderSize ¶
func (Instance) SetCellHeight ¶
func (Instance) SetCellSize ¶
func (Instance) SetCollisionMaskValue ¶
Based on [param value], enables or disables the specified layer in the [member geometry_collision_mask], given a [param layer_number] between 1 and 32.
func (Instance) SetDetailSampleDistance ¶
func (Instance) SetDetailSampleMaxError ¶
func (Instance) SetEdgeMaxError ¶
func (Instance) SetEdgeMaxLength ¶
func (Instance) SetFilterBakingAabb ¶
func (self Instance) SetFilterBakingAabb(value AABB.PositionSize)
func (Instance) SetFilterBakingAabbOffset ¶
func (Instance) SetFilterLedgeSpans ¶
func (Instance) SetFilterLowHangingObstacles ¶
func (Instance) SetFilterWalkableLowHeightSpans ¶
func (Instance) SetGeometryCollisionMask ¶
func (Instance) SetGeometryParsedGeometryType ¶
func (self Instance) SetGeometryParsedGeometryType(value gdclass.NavigationMeshParsedGeometryType)
func (Instance) SetGeometrySourceGeometryMode ¶
func (self Instance) SetGeometrySourceGeometryMode(value gdclass.NavigationMeshSourceGeometryMode)
func (Instance) SetGeometrySourceGroupName ¶
func (Instance) SetRegionMergeSize ¶
func (Instance) SetRegionMinSize ¶
func (Instance) SetSamplePartitionType ¶
func (self Instance) SetSamplePartitionType(value gdclass.NavigationMeshSamplePartitionType)
func (Instance) SetVertices ¶
func (Instance) SetVerticesPerPolygon ¶
func (*Instance) UnsafePointer ¶
func (Instance) VerticesPerPolygon ¶
type ParsedGeometryType ¶
type ParsedGeometryType = gdclass.NavigationMeshParsedGeometryType //gd:NavigationMesh.ParsedGeometryType
const ( /*Parses mesh instances as geometry. This includes [MeshInstance3D], [CSGShape3D], and [GridMap] nodes.*/ ParsedGeometryMeshInstances ParsedGeometryType = 0 /*Parses [StaticBody3D] colliders as geometry. The collider should be in any of the layers specified by [member geometry_collision_mask].*/ ParsedGeometryStaticColliders ParsedGeometryType = 1 /*Both [constant PARSED_GEOMETRY_MESH_INSTANCES] and [constant PARSED_GEOMETRY_STATIC_COLLIDERS].*/ ParsedGeometryBoth ParsedGeometryType = 2 /*Represents the size of the [enum ParsedGeometryType] enum.*/ ParsedGeometryMax ParsedGeometryType = 3 )
type SamplePartitionType ¶
type SamplePartitionType = gdclass.NavigationMeshSamplePartitionType //gd:NavigationMesh.SamplePartitionType
const ( /*Watershed partitioning. Generally the best choice if you precompute the navigation mesh, use this if you have large open areas.*/ SamplePartitionWatershed SamplePartitionType = 0 /*Monotone partitioning. Use this if you want fast navigation mesh generation.*/ SamplePartitionMonotone SamplePartitionType = 1 /*Layer partitioning. Good choice to use for tiled navigation mesh with medium and small sized tiles.*/ SamplePartitionLayers SamplePartitionType = 2 /*Represents the size of the [enum SamplePartitionType] enum.*/ SamplePartitionMax SamplePartitionType = 3 )
type SourceGeometryMode ¶
type SourceGeometryMode = gdclass.NavigationMeshSourceGeometryMode //gd:NavigationMesh.SourceGeometryMode
const ( /*Scans the child nodes of the root node recursively for geometry.*/ SourceGeometryRootNodeChildren SourceGeometryMode = 0 /*Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry_source_group_name].*/ SourceGeometryGroupsWithChildren SourceGeometryMode = 1 /*Uses nodes in a group for geometry. The group is specified by [member geometry_source_group_name].*/ SourceGeometryGroupsExplicit SourceGeometryMode = 2 /*Represents the size of the [enum SourceGeometryMode] enum.*/ SourceGeometryMax SourceGeometryMode = 3 )