跳至正文
版本:latest - a1.147.x ⚖️

🚢 导航

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

🗿Static Class
This is a Static Class. Access it's methods directly with .. It's not possible to spawn new instances.
💂Authority
This static class can be accessed only on 🟧 Client side.
🧑‍💻API Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!

🗿 静态函数

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

FindPathToLocation

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

Parameters

TypeParameterDefaultDescription
Vectorstart_location Required parameter No description provided
Vectorend_location Required parameter No description provided

Returns

TypeDescription
tablewith this format

GetRandomPointInNavigableRadius

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

Parameters

TypeParameterDefaultDescription
Vectororigin Required parameter No description provided
floatradius Required parameter No description provided

Returns

TypeDescription
Vector随机点

GetRandomReachablePointInRadius

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

Parameters

TypeParameterDefaultDescription
Vectororigin Required parameter No description provided
floatradius Required parameter No description provided

Returns

TypeDescription
Vector随机点

🚀 事件

This class doesn't have own events.