Building a NavMesh
条评论创建导航网格与Unity2017面板详细参数说明。
时间仓促,大部分采用google机器翻译来不及全部校对翻译成中文资料 本篇作为笔记。感兴趣的可以看下。这篇是记录Unity3D寻路的官方文档阅读体验。
The Navigation System allows you to create characters which can navigate the game world. It gives your characters the ability to understand that they need to take stairs to reach second floor, or to jump to get over a ditch. The Unity NavMesh system consists of the following pieces:
Unity3d的寻路系统大概有下面几个部分:
NavMesh(导航网格的缩写)是描述游戏世界的步行表面的数据结构,并且允许从游戏世界中的一个步行位置到另一个步行路径找到路径。 数据结构是烘焙的网格里获取的。
NavMesh (short for Navigation Mesh) is a data structure which describes the walkable surfaces of the game world and allows to find path from one walkable location to another in the game world. The data structure is built, or baked, automatically from your level geometry.
NavMesh Agent组件帮助您创建角色,在向目标移动时避开彼此。Agent使用NavMesh理解游戏世界,他们知道如何避免彼此以及移动障碍物。
离网链接组件允许您合并无法使用可走行的曲面表示的导航快捷方式。 例如,跳过沟渠或栅栏,或者在走过它之前打开门,都可以被描述为“Off-mesh”链接。
NavMesh Agent component help you to create characters which avoid each other while moving towards their goal. Agents reason about the game world using the NavMesh and they know how to avoid each other as well as moving obstacles.
Off-Mesh Link component allows you to incorporate navigation shortcuts which cannot be represented using a walkable surface. For example, jumping over a ditch or a fence, or opening a door before walking through it, can be all described as Off-mesh links.
NavMesh障碍组件允许您描述Agent在航行世界时应避免的移动障碍。 物理系统控制的一个桶或一个箱子是一个障碍的好例子。 当障碍物移动时,障碍物尽力避开它,但是一旦障碍物变得静止,它将在导航网上挖一个洞,使得障碍物可以改变它们的路径来绕过障碍物,或者如果障碍物妨碍路径 方式,Agent可以找到不同的路线。
NavMesh Obstacle component allows you to describe moving obstacles the agents should avoid while navigating the world. A barrel or a crate controlled by the physics system is a good example of an obstacle. While the obstacle is moving the agents do their best to avoid it, but once the obstacle becomes stationary it will carve a hole in the navmesh so that the agents can change their paths to steer around it, or if the stationary obstacle is blocking the path way, the agents can find a different route.
今天凌晨开始写这篇文章,想写这个主题很久了。相信每个资深开发都经历过每次公司要发版本之前都会有一堆bug闪现。真让人苦恼。很高兴 Unity technology 于 今年的六一儿童节更新了自动化测试的特性。这下终于不用再导入第三方自动化测试插件了。当然本章节会相对完整的快速概述其重要部分。如果你还想知道更多, Unity3D 已经提供了比较完善的文档。
今天有朋友问了我三个问题:
在篇中我会解答,如果还有其他问题 请给我留言,我会追加叙述。求关注 求转发。把爱传出去 笑~
接上回 Rounded Cube 2.本章主题如下:
此为本人阅读笔记不作为转载处理,详细还请参看原文. 原文地址