[Navigation]Navigation初探[2]

编程入门 行业动态 更新时间:2024-10-27 15:16:09

[<a href=https://www.elefans.com/category/jswz/34/1771185.html style=Navigation]Navigation初探[2]"/>

[Navigation]Navigation初探[2]

在烘焙完了navMesh之后,就可以为放置在navmesh上的物体进行寻路了.

NavigationMeshAgent是所有需要导航的物体需要添加的控件.通过对Destination的设定可以让其物体自动移动.自动移动时,会改变其velocity.

当然,也可以通过CalculatePath()函数来获取计算出的路径而不进行移动操作.

 

Property:Function:
RadiusRadius around the agent within which obstacles should not pass.
SpeedMaximum movement speed (in world units per second).
AccelerationMaximum acceleration (in world units per second squared).
Angular SpeedMaximum speed of rotation (degrees per second).
Stopping distanceMinimum distance from the target within which the agent can stop.
Auto Traverse OffMesh LinkShould off-mesh links be crossed automatically without intervention from a script?
Auto RepathShould a new path be calculated if the current one becomes obstructed or invalid?
Auto BrakingShould the agent automatically slow down as it approaches the target point?
HeightThe height clearance the agent needs to pass below an obstacle overhead.
Base offsetHeight difference between the anchor point of the GameObject and the centre point of the agent’s cylinder.
Obstacle Avoidance TypeAn approximate quality level for obstacle avoidance.
Avoidance PriorityAgents of lower priority will be ignored by this agent when performing avoidance. The value should be in the range 0..99 where lower numbers indicate higher priority.
NavMesh WalkableSpecifies the Navmesh layers that the agent can traverse.

图片中的Acceleration表示的是加速度,表示每秒速度的最大变化量. 但除此之外,这个值还表示了物体转弯儿时的最大加速度,当此值较小时,转弯弧度会比较大,较大时,转弯弧度会很小.

Angular Speed表示的物体自身旋转的速度,即物体运动方向改变时,物体朝向的变化速度.

 

转载于:.html

更多推荐

[Navigation]Navigation初探[2]

本文发布于:2024-03-12 00:00:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1730235.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Navigation

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!