Navigation mesh agent.
acceleration | The maximum acceleration of an agent as it follows a path, given in units / sec^2. |
angularSpeed | Maximum turning speed in (deg/s) while following a path. |
autoBraking | Should the agent brake automatically to avoid overshooting the destination point? |
autoRepath | Should the agent attempt to acquire a new path if the existing path becomes invalid? |
autoTraverseOffMeshLink | Should the agent move via OffMeshLinks automatically? |
avoidancePriority | The avoidance priority level. |
baseOffset | The relative vertical displacement of the owning GameObject. |
currentOffMeshLinkData | The current OffMeshLinkData. |
desiredVelocity | 指的是导航网格代理的期望速度,与其当前速度不是等价的. (Read Only) |
destination | 导航的目的地. |
hasPath | Does the agent currently have a path? (Read Only) |
height | The height of the agent for purposes of passing under obstacles, etc. |
isOnOffMeshLink | 导航网格代理当前的位置是否位于OffMeshLink? (Read Only) |
isPathStale | Is the current path stale. (Read Only) |
nextOffMeshLinkData | The next OffMeshLinkData on the current path. |
nextPosition | 顾名思义,也就是下一个位置,在Update函数中打印这个属性,你会发现打印出的结果与这个导航网格代理周游过的路径一致 |
obstacleAvoidanceType | The level of quality of avoidance. |
path | Property to get and set the current path. |
pathPending | Is a path in the process of being computed but not yet ready? (Read Only) |
pathStatus | The status of the current path (complete, partial or invalid). |
radius | The avoidance radius for the agent. |
remainingDistance | 导航网格代理离目的地还剩的距离,如果其值为0,那么代理已经到达了目的地了. (Read Only) |
speed | Maximum movement speed when following a path. |
steeringTarget | 这个属性是相当重要的,它指的是导航网格代理在导航网格中周游时所经过的拐点. (Read Only) |
stoppingDistance | Stop within this distance from the target position. |
updatePosition | Should the agent update the transform position? |
updateRotation | Should the agent update the transform orientation? |
velocity | 导航网格代理周游时的实时速度,非常重要. |
walkableMask | Specifies which NavMesh layers are passable (bitfield). Changing walkableMask will make the path stale (see isPathStale) |
ActivateCurrentOffMeshLink | 当activated为true激活OffMeshLink. |
CalculatePath | Calculate a path to a specified point and store the resulting path. |
CompleteOffMeshLink | 让导航网格代理完成在OffMeshLink上的周游. |
FindClosestEdge | Locate the closest NavMesh edge. |
GetLayerCost | Gets the cost for crossing ground of a particular type. |
Move | 让导航网格代理朝向量v的世界坐标系方向平移v的长度 |
Raycast | Trace a straight path towards a target postion in the NavMesh without moving the agent. |
ResetPath | Clears the current path. |
Resume | 恢复寻路状态,此时角色会在上一次执行了Stop函数停下来后恢复当时的状态,目的地为上一次的目的地 |
SamplePathPosition | Sample a position along the current path. |
SetDestination | 设置目的地,与nma.destination = v一样,这个函数在设置目的地成功后返回true,否则返回false,就只比调用属性多了一个返回值. |
SetLayerCost | Sets the cost for traversing over geometry of the layer type. |
SetPath | Assign a new path to this agent. |
Stop | 让导航网格代理停暂停寻路,但此寻路状态可以靠 Resume 函数恢复到寻路状态,并且目的地也与上次一样. |
Warp | Warps agent to the provided position. |