用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:navmeshagent:navmeshagent

NavMeshAgent 导航网格代理

class in UnityEngine/Inherits from: Behaviour

Description 描述

Navigation mesh agent.

导航网格代理。

This component is attached to a mobile character in the game to allow it to navigate the scene using the NavMesh. See the Navigation section of the manual for further details.

该组件附加于游戏中移动角色上,允许使用导航网格在场景中进行导航。请参考Navigation 帮助手册了解更多细节。

Variables 变量

accelerationThe maximum acceleration of an agent as it follows a path, given in units/sec^2 .
该代理跟随路径的最大加速度,指定单位/秒^2。
angularSpeedMaximum turning speed in (deg/s) while following a path.
跟随路径的最大转向速度单位(度/秒)。
areaMaskSpecifies which NavMesh areas are passable. Changing areaMask will make the path stale (see isPathStale).
指定导航网格区域是可行的。该变区域遮挡将会使路径变旧(请参考isPathStale)。
autoBrakingShould the agent brake automatically to avoid overshooting the destination point?
该代理是否自动制动去避免超过目的点?
autoRepathShould the agent attempt to acquire a new path if the existing path becomes invalid?
当现在的路径变成无效时该代理是否尝试获取新路径?
autoTraverseOffMeshLinkShould the agent move across OffMeshLinks automatically?
该代理是否自动穿过OffMeshLinks?
avoidancePriorityThe avoidance priority level.
逃避优先级。
baseOffsetThe relative vertical displacement of the owning GameObject.
对象自身的相对垂直位移。
currentOffMeshLinkDataThe current OffMeshLinkData.
当前关闭网格连接数据。
desiredVelocityThe desired velocity of the agent including any potential contribution from avoidance. (Read Only)
该代理的需求速度包括任何逃避时潜在的贡献(只读)。
destinationGets or attempts to set the destination of the agent in world-space units.
获取或者尝试去在世界空间单位中设置代理的目的地。
hasPathDoes the agent currently have a path? (Read Only)
当前代理是否有路径(只读)?
heightThe height of the agent for purposes of passing under obstacles, etc.
代理经过障碍物下方目的高度,等等。
isOnNavMeshIs the agent currently bound to the navmesh? (Read Only)
当前代理束缚到导航网格?(只读)
isOnOffMeshLinkIs the agent currently positioned on an OffMeshLink? (Read Only)
当前代理位置是否在OffMeshLink上?(只读)
isPathStaleIs the current path stale. (Read Only)
当前路径是否是旧路径。(只读)
nextOffMeshLinkDataThe next OffMeshLinkData on the current path.
在当前路径上的下一个OffMeshLinkData。
nextPositionGets or sets the simulation position of the navmesh agent.
获取或者设置导航网格的模拟仿真位置。
obstacleAvoidanceTypeThe level of quality of avoidance.
逃避的质量的级别。
pathProperty to get and set the current path.
获取或者设置当前路径属性。
pathPendingIs a path in the process of being computed but not yet ready? (Read Only)
该路径在被计算的过程中但是还没准备?(只读)
pathStatusThe status of the current path (complete, partial or invalid).
当前路况的状态(完整,局部或者无效)。
radiusThe avoidance radius for the agent.
代理的逃避半径。
remainingDistanceThe distance between the agent's position and the destination on the current path. (Read Only)
在当前路径上代理的位置与目的地之间的距离。(只读)
speedMaximum movement speed when following a path.
当跟随路径时的最大移动速度。
steeringTargetGet the current steering target along the path. (Read Only)
获取当前沿着路径转向的目标(只读)。
stoppingDistanceStop within this distance from the target position.
从目标位置开始,在该距离之内刹车。
updatePositionGets or sets whether the transform position is synchronized with the simulated agent position. The default value is true.
获取或者设置变换位置与模拟代理位置同步。默认值为true。
updateRotationShould the agent update the transform orientation?
代理是否应该更新方向?
velocityAccess the current velocity of the NavMeshAgent component, or set a velocity to control the agent manually.
使用NavMeshAgent 组件的当前速度,或者手动设置速度去控制代理。

Public Functions 公共函数

ActivateCurrentOffMeshLinkEnables or disables the current off-mesh link.
启用或者禁用当前分离网格链接。
CalculatePathCalculate a path to a specified point and store the resulting path.
计算出路径指定点并存储结果路径。
CompleteOffMeshLinkCompletes the movement on the current OffMeshLink.
在当前分离网格链接上完成运动。
FindClosestEdgeLocate the closest NavMesh edge.
查找导航网格最近的边缘。
GetAreaCostGets the cost for path calculation when crossing area of a particular type.
当穿过特别类型的区域时获取路径计算成本。
MoveApply relative movement to current position.
应用相对运动到当前位置。
RaycastTrace a straight path towards a target postion in the NavMesh without moving the agent.
在导航网格中朝着目标方向追踪直线路径而不移动代理。
ResetPathClears the current path.
清除当前路径。
ResumeResumes the movement along the current path after a pause.
暂停之后沿着当前路径重新恢复运动。
SamplePathPositionSample a position along the current path.
沿着当前路径的样本位置。
SetAreaCostSets the cost for traversing over areas of the area type.
设置穿越区域的区域类型的成本。
SetDestinationSets or updates the destination thus triggering the calculation for a new path.
设置或者更新目的地因此触发计算新的路径。
SetPathAssign a new path to this agent.
分配新路径给该代理。
StopStop movement of this agent along its current path.
该代理沿着它的当前路径的刹车运动。
WarpWarps agent to the provided position.
弯曲代理提供位置。
script/unityengine/classes/navmeshagent/navmeshagent.txt · 最后更改: 2016/08/02 05:34 (外部编辑)