跳至正文
版本:最新版 - a1.156.0 ⚖️

🚢 导航

在可导航空间中创建一条可达路径。

🗿Static ClassClient Only🧑‍💻API Source

🗿 静态函数​

ReturnsNameDescription
tableFindPathToLocation根据起点和终点位置查找一条路径
VectorGetRandomPointInNavigableRadius在限定于原点周围半径的可导航空间内查找一个随机点。生成的位置不会测试从原点出发的可达性
VectorGetRandomReachablePointInRadius在限定于原点周围半径的可导航空间内,查找一个随机且可达的点

Moderate

FindPathToLocation​

根据起点和终点位置查找一条路径(仅在地图具有寻路网格体时有效)
local ret = Navigation.FindPathToLocation(start_location, end_location)

Parameters

TypeParameterDefaultDescription
Vectorstart_location Required parameter 世界起始位置
Vectorend_location Required parameter 世界结束位置

Returns

TypeDescription
table包含路径节点以及是否成功找到路径信息的表 with this format

Moderate

GetRandomPointInNavigableRadius​

在限定于原点周围半径的可导航空间内查找一个随机点。生成的位置不会测试从原点出发的可达性(仅在地图具有寻路网格体时有效)
local ret = Navigation.GetRandomPointInNavigableRadius(origin, radius)

Parameters

TypeParameterDefaultDescription
Vectororigin Required parameter 搜索的中心
floatradius Required parameter 搜索半径

Returns

TypeDescription
Vector随机点

Moderate

GetRandomReachablePointInRadius​

在限定于原点周围半径的可导航空间内,查找一个随机且可达的点(仅在地图具有寻路网格体时有效)
local ret = Navigation.GetRandomReachablePointInRadius(origin, radius)

Parameters

TypeParameterDefaultDescription
Vectororigin Required parameter 搜索的中心
floatradius Required parameter 搜索半径

Returns

TypeDescription
Vector随机点

🚀 事件​

This class doesn't have own events.