NavigationPathQueryParameters3D
实验性: This class may be changed or removed in future versions.
继承: RefCounted
< Object
Provides parameters for 3D navigation path queries.
描述
By changing various properties of this object, such as the start and target position, you can configure path queries to the NavigationServer3D
.
属性
枚举
enum PathfindingAlgorithm:
PathfindingAlgorithm PATHFINDING_ALGORITHM_ASTAR = 0
The path query uses the default A* pathfinding algorithm.
enum PathPostProcessing:
PathPostProcessing PATH_POSTPROCESSING_CORRIDORFUNNEL = 0
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.
PathPostProcessing PATH_POSTPROCESSING_EDGECENTERED = 1
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.
flags PathMetadataFlags:
PathMetadataFlags PATH_METADATA_INCLUDE_NONE = 0
Don't include any additional metadata about the returned path.
PathMetadataFlags PATH_METADATA_INCLUDE_TYPES = 1
Include the type of navigation primitive (region or link) that each point of the path goes through.
PathMetadataFlags PATH_METADATA_INCLUDE_RIDS = 2
Include the RID
s of the regions and links that each point of the path goes through.
PathMetadataFlags PATH_METADATA_INCLUDE_OWNERS = 4
Include the ObjectID
s of the Object
s which manage the regions and links each point of the path goes through.
PathMetadataFlags PATH_METADATA_INCLUDE_ALL = 7
Include all available metadata about the returned path.
属性说明
RID
map = RID()
The navigation map RID
used in the path query.
PathMetadataFlags metadata_flags = 7
void
set_metadata_flags ( value: PathMetadataFlags )- PathMetadataFlags get_metadata_flags ( )
Additional information to include with the navigation path.
int
navigation_layers = 1
The navigation layers the query will use (as a bitmask).
PathPostProcessing path_postprocessing = 0
void
set_path_postprocessing ( value: PathPostProcessing )- PathPostProcessing get_path_postprocessing ( )
The path postprocessing applied to the raw path corridor found by the pathfinding_algorithm
.
PathfindingAlgorithm pathfinding_algorithm = 0
void
set_pathfinding_algorithm ( value: PathfindingAlgorithm )- PathfindingAlgorithm get_pathfinding_algorithm ( )
The pathfinding algorithm used in the path query.
float
simplify_epsilon = 0.0
The path simplification amount in worlds units.
bool
simplify_path = 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".
Vector3
start_position = Vector3(0, 0, 0)
The pathfinding start position in global coordinates.
Vector3
target_position = Vector3(0, 0, 0)
The pathfinding target position in global coordinates.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。