Inheritance #

RefCounted

- AESContext
- AStar2D
- AStar3D
- AStarGrid2D
- AudioEffectInstance (1)
- AudioSample
- AudioSamplePlayback
- AudioStreamPlayback (5)
- CameraFeed
- CharFXTransform
- ConfigFile
- Crypto
- DTLSServer
- DirAccess
- ENetConnection
- EditorContextMenuPlugin
- EditorDebuggerPlugin
- EditorDebuggerSession
- EditorExportPlatform (6)
- EditorExportPlugin
- EditorExportPreset
- EditorFeatureProfile
- EditorFileSystemImportFormatSupportQuery
- EditorInspectorPlugin
- EditorResourceConversionPlugin
- EditorResourcePreviewGenerator
- EditorResourceTooltipPlugin
- EditorSceneFormatImporter (4)
- EditorScenePostImport
- EditorScenePostImportPlugin
- EditorScript
- EditorTranslationParserPlugin
- EncodedObjectAsID
- EngineProfiler
- Expression
- FileAccess
- GLTFObjectModelProperty
- HMACContext
- HTTPClient
- HashingContext
- ImageFormatLoader (1)
- JavaClass
- JavaObject
- JavaScriptObject
- KinematicCollision2D
- KinematicCollision3D
- Lightmapper (1)
- MeshConvexDecompositionSettings
- MeshDataTool
- MultiplayerAPI (2)
- Mutex
- NavigationPathQueryParameters2D
- NavigationPathQueryParameters3D
- NavigationPathQueryResult2D
- NavigationPathQueryResult3D
- Node3DGizmo (1)
- OggPacketSequencePlayback
- OpenXRAPIExtension
- PCKPacker
- PackedDataContainerRef
- PacketPeer (8)
- PhysicsPointQueryParameters2D
- PhysicsPointQueryParameters3D
- PhysicsRayQueryParameters2D
- PhysicsRayQueryParameters3D
- PhysicsShapeQueryParameters2D
- PhysicsShapeQueryParameters3D
- PhysicsTestMotionParameters2D
- PhysicsTestMotionParameters3D
- PhysicsTestMotionResult2D
- PhysicsTestMotionResult3D
- RDAttachmentFormat
- RDFramebufferPass
- RDPipelineColorBlendState
- RDPipelineColorBlendStateAttachment
- RDPipelineDepthStencilState
- RDPipelineMultisampleState
- RDPipelineRasterizationState
- RDPipelineSpecializationConstant
- RDSamplerState
- RDShaderSource
- RDTextureFormat
- RDTextureView
- RDUniform
- RDVertexAttribute
- RandomNumberGenerator
- RegEx
- RegExMatch
- RenderSceneBuffers (2)
- RenderSceneBuffersConfiguration
- Resource (103)
- ResourceFormatLoader
- ResourceFormatSaver
- ResourceImporter (16)
- SceneState
- SceneTreeTimer
- Semaphore
- SkinReference
- StreamPeer (5)
- SurfaceTool
- TCPServer
- TLSOptions
- TextLine
- TextParagraph
- TextServer (1)
- Thread
- TranslationDomain
- TriangleMesh
- Tween
- Tweener (5)
- UDPServer
- UPNP
- UPNPDevice
- WeakRef
- WebRTCPeerConnection (1)
- XMLParser
- XRInterface (4)
- XRPose
- XRTracker (2)
- ZIPPacker
- ZIPReader
NavigationPathQueryParameters2D

Table of contents

NavigationPathQueryParameters2D #

is_refcounted, is_instantiable, core, not_builtin_classes

Provides parameters for 2D navigation path queries.

By changing various properties of this object, such as the start and target position, you can configure path queries to the NavigationServer2D.

Members #

var map: RID = RID()#

The navigation map RID used in the path query.

var metadata_flags = PATH_METADATA_INCLUDE_ALL#

Additional information to include with the navigation path.

The navigation layers the query will use (as a bitmask).

var path_postprocessing = PATH_POSTPROCESSING_CORRIDORFUNNEL#

The path postprocessing applied to the raw path corridor found by the pathfinding_algorithm.

var pathfinding_algorithm = PATHFINDING_ALGORITHM_ASTAR#

The pathfinding algorithm used in the path query.

var simplify_epsilon: float = 0.0#

The path simplification amount in worlds units.

var simplify_path: bool = false#

If true a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by simplify_epsilon. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation.

Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields".

var start_position: Vector2 = Vector2(0, 0)#

The pathfinding start position in global coordinates.

var target_position: Vector2 = Vector2(0, 0)#

The pathfinding target position in global coordinates.

Methods #

Annotations #

Constants #

const PATHFINDING_ALGORITHM_ASTAR = 0 enum PathfindingAlgorithm#

The path query uses the default A* pathfinding algorithm.

const PATH_POSTPROCESSING_CORRIDORFUNNEL = 0 enum PathPostProcessing#

Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes.

const PATH_POSTPROCESSING_EDGECENTERED = 1 enum PathPostProcessing#

Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center.

const PATH_POSTPROCESSING_NONE = 2 enum PathPostProcessing#

Applies no postprocessing and returns the raw path corridor as found by the pathfinding algorithm.

const PATH_METADATA_INCLUDE_NONE = 0 enum PathMetadataFlags
Bitfield
#

Don't include any additional metadata about the returned path.

const PATH_METADATA_INCLUDE_TYPES = 1 enum PathMetadataFlags
Bitfield
#

Include the type of navigation primitive (region or link) that each point of the path goes through.

const PATH_METADATA_INCLUDE_RIDS = 2 enum PathMetadataFlags
Bitfield
#

Include the RIDs of the regions and links that each point of the path goes through.

const PATH_METADATA_INCLUDE_OWNERS = 4 enum PathMetadataFlags
Bitfield
#

Include the ObjectIDs of the Objects which manage the regions and links each point of the path goes through.

const PATH_METADATA_INCLUDE_ALL = 7 enum PathMetadataFlags
Bitfield
#

Include all available metadata about the returned path.

Constructors #

Enums #

PathfindingAlgorithm#

enum PathfindingAlgorithm { PATHFINDING_ALGORITHM_ASTAR = 0, }

PathPostProcessing#

enum PathPostProcessing { PATH_POSTPROCESSING_CORRIDORFUNNEL = 0, PATH_POSTPROCESSING_EDGECENTERED = 1, PATH_POSTPROCESSING_NONE = 2, }

PathMetadataFlags#

enum PathMetadataFlags { PATH_METADATA_INCLUDE_NONE = 0, PATH_METADATA_INCLUDE_TYPES = 1, PATH_METADATA_INCLUDE_RIDS = 2, PATH_METADATA_INCLUDE_OWNERS = 4, PATH_METADATA_INCLUDE_ALL = 7, }

Operators #

Signals #

Theme Items #

Tutorials #