纳金网

标题: 分离网格链接 [打印本页]

作者: .    时间: 2013-1-31 22:31
标题: 分离网格链接
Note that this section is primarily about the manual off-mesh links, namely those that are set up by the user via the OffMeshLink component. For automatically generated off-mesh links, see the the Navmesh intro请注意,本部分主要是讲关于手动进行分离网格的链接,即用户通过OffMeshLink 组件创建的。对于自动生成分离网格的链接,参见Navmesh intro导航网格介绍It is possible that the navmesh static geometry in the scene is disconnected, thus making it impossible for agents to get from one part of the world to the other.有时,场景中的静态几何体的导航网格不是全部相连在一起的,从而使代理不能从世界场景的这一部分移动到另外的部分。To remedy this, Unity has a system of Off-mesh links为了解决这个问题,Unity有分离网格连接系统The OffMeshLink component 分离网格连接组件An off-mesh link is a component that can be placed on any object, and it has the following properties分离网格的连接,是一个可以放置任何物体上的组件,它具有以下属性    Start 开始
    The start object of the off-mesh link.
    分离网格链接的开始点物体
    End 结束
    The end object of the off-mesh link.
    分离网格链接的结束点物体
    Cost Override
    开销覆盖
    If value is positive, use it when calculating path cost on processing a path request. Otherwise, we use the default cost (cost of the layer to which this game object belongs). If the Cost Override is set to the value 3.0, moving over the off-mesh link will be three times more expensive than moving the same distance on a default NavMesh area. This property is&nbsp***ntime-editable and does not require a re-bake
    如果值为正数,计算处理路径的请求时,路径开销。否则,我们使用默认开销成本(这个游戏对象所属的层的开销)。如果Cost Override的值设置为3.0,在分离网格的链接移动相同的距离的开销,是在默认的导航网的三倍。此属性是运行时可编辑,不需要重新烘焙。
    Bi Directional 双向定向
    If this is on, the link can be traversed both ways, if it's off, the link can only be traversed in the direction from Start to End.
    如果勾上这个选项,链接的两个方向都可以通过,如果取消勾选的话,只能从开始点到结束点这样的链接方向通过。
    Activated 激活
    Specifies if this link is actually used by the pathfinder. When this property is false, the off-mesh link will be disregarded. This property is&nbsp***ntime-editable, and does not require a re-bake.
    指定这个链接实际上是否由寻路者使用。当此属性为false,分离网格的链接将被不予理会。此属性是实时可编辑的,不需要重新烘焙。 Special notes on OffMeshLink properties
分离网格链接OffMeshLink属性的特别注意事项The "Activated" and "Cost Override" properties can be changed at&nbsp***ntime and have immediate effect. All other properties require a Navmesh re-bake before they effect."激活"和"Cost Override"的属性可以在运行时改变,有立竿见影的效果(值一改变,马上就产生效果)。其他所有属性改变需要重新烘焙导航网格才会起作用。If the start or end transforms are unassigned when baking, or if the position of either the start or end transforms is too far away from the NavMesh to find valid positions, the off-mesh links will not be generated. In this case, an error is displayed in the Console window.在烘焙时,如果未分配开始或结束的变换(transforms)的位置,或者是跟导航网格离得太远,而无法找到有效的位置,分离网格链接将不会产生。在这种情况下,在控制台窗口(Console window)中显示一个错误。【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/




欢迎光临 纳金网 (http://wwww.narkii.com/club/) Powered by Discuz! X2.5