导航寻路组件属性及API的使用

NavMeshAgent 组件面板属性:

agent.updateRotation = false; //不允许NavMesh来旋转角色 agent.updatePosition = true; //允许NavMesh来移动角色

agent.velocity.magnitude 这个也是速度, GetComponent().SetFloat(“Speed”, agent.velocity.magnitude);

speed 移动速度

Angular Speed 转角速度 ,转身速度 角速度: 最高转速(度/秒)。

Acceleration 加速度,启动时的 最大加速度。

Stopping Distance 停止距离 ,制动距离:制动距离。到目的地的距离小于这个值,代理减速。

Auto Traverse OffMesh Link 自动遍历OffMesh链接:自动移动并关闭OffMeshLinks

Auto Repath 自动重新寻路:如果现有的部分已失效,获得新的路径。

Height 高度:代理的高度(用于调试图形)。

Base offset 基本偏移:碰撞几何体相对于实际几何体垂直的偏移。

Obstacle Avoidance Type 障碍躲避类型 :躲避的质量水平。

NavMesh Walkable 导航网格行走:指定代理可以遍历的导航网格层类型。这个参数很有用,在接下来的实例中可以用到。

所有NavMeshAgent函数和变量翻译:

NavMeshAgent.isOnOffMeshLink 是否在OffMeshLink上

NavMeshAgent.isPathStale 是否是旧路径

NavMeshAgent.Move 移动

NavMeshAgent.nextOffMeshLinkData 下一个OffMeshLink数据

NavMeshAgent.nextPosition 下个位置

NavMeshAgent.obstacleAvoidanceType 障碍逃避类型

NavMeshAgent.path 路径

NavMeshAgent.pathPending 路径等待

NavMeshAgent.pathStatus 路径状况

NavMeshAgent.radius 半径

NavMeshAgent.Raycast 射线投影

NavMeshAgent.remainingDistance 剩余距离

NavMeshAgent.ResetPath 重新设置路径

NavMeshAgent.Resume 恢复

NavMeshAgent.SamplePathPosition 样本路径位置

NavMeshAgent.SetAreaCost 设置区域成本

NavMeshAgent.SetDestination 设置目的地

NavMeshAgent.SetPath 设置路径

NavMeshAgent.speed 速度

NavMeshAgent.steeringTarget 转向目标

NavMeshAgent.Stop 刹车

NavMeshAgent.stoppingDistance 刹车距离

NavMeshAgent.updatePosition 更新位置

NavMeshAgent.updateRotation 更新旋转

NavMeshAgent.velocity 速度

NavMeshAgent.Warp 弯曲 NavMeshAgent.acceleration 加速度

NavMeshAgent.ActivateCurrentOffMeshLink 激活当前分离网格链接

NavMeshAgent.angularSpeed 角速度

NavMeshAgent.areaMask 区域遮挡

NavMeshAgent.autoBraking 自动制动

NavMeshAgent.autoRepath 自动重新获取路径

NavMeshAgent.autoTraverseOffMeshLink 自动穿过OffMeshLink

NavMeshAgent.avoidancePriority 逃避优先级

NavMeshAgent.baseOffset 基础偏移

NavMeshAgent.CalculatePath 计算路径

NavMeshAgent.CompleteOffMeshLink 完成分离网格链接

NavMeshAgent.currentOffMeshLinkData 当前关闭网格连接数据

NavMeshAgent.desiredVelocity 需求速度

NavMeshAgent.destination 目的地

NavMeshAgent.FindClosestEdge 寻找最近边缘

NavMeshAgent.GetAreaCost 获取区域成本

NavMeshAgent.hasPath 有路径

NavMeshAgent.height 高度

NavMeshAgent.isOnNavMesh 是否在导航网格上

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值