导航部门
A Navigation Sector is a cuboid-shaped navigation area that enables the following:Navigation Sector是长方体形的导航区域,可启用以下功能:
Both the 2D and 3D routes can be calculated within navigation sectors.2D和3D路线都可以在导航扇区内计算。
- In case of 2D routes, a point moves in a lower plane of the navigation sector (Z coordinate is not taken into account). If the height or radius set for this point is greater than the size of the navigation sector, such sector is discarded from pathfinding.在2D路线的情况下,点在导航扇区的下平面中移动(不考虑Z坐标)。如果为此点设置的高度或半径大于导航扇区的大小,则将从寻路中丢弃该扇区。
- In case of 3D routes, a point moves in three dimensions. If the radius set for this point is greater than the size of the navigation sector, such sector is discarded from pathfinding.如果是3D路线,则点将在三个维度上移动。如果为此点设置的半径大于导航扇区的大小,则将从寻路中丢弃该扇区。
Routes can be calculated within several intersecting navigation sectors. The intersecting sectors are treated as a single navigation area.可以在几个相交的导航扇区内计算路线。相交的扇区被视为单个导航区域。
In case of 2D routes, the height difference between the intersecting sectors must not exceed the maximum height set for the 2D route; otherwise these sectors are discarded from pathfinding.对于2D路线,相交扇区之间的高度差不得超过为2D路线设置的最大高度;否则,将这些扇区从寻路中丢弃。
See also也可以看看#
- The NavigationSector class to manage navigation sectors via APINavigationSector类,用于通过API管理导航扇区
- The PathRoute class to create 2D and 3D routes inside navigation sectorsPathRoute类可在导航扇区内创建2D和3D路线
- The article on Creating Routes的文章创建路线
A set of samples located in the <UnigineSDK>/data/samples/paths folder:位于<UnigineSDK>/data/samples/paths文件夹中的一组样本:
- route_00
- route_01
- route_02
- sector_00
- sector_01
- sector_02
- Navigation sample in C# Component Samples suite一组 C# Component Samples 例子中的一个 Navigation 例子
Creating Navigation Sector创建导航部门#
To create a navigation sector via UnigineEditor:要通过UnigineEditor创建导航扇区,请执行以下操作:
- Run UnigineEditor.跑步UnigineEditor。
On the Menu bar, click Create -> Navigation -> Navigation Sector.在菜单栏上,单击Create -> Navigation -> Navigation Sector。
Click somewhere in the world to place the navigation sector.单击世界上的某个地方以放置导航部门。
A navigation sector导航部门A new navigation sector is added to UnigineEditor and you can edit it via the Parameters window.新的导航扇区已添加到UnigineEditor中,您可以通过参数窗户。
Editing Navigation Sector编辑导航区#
In the Node tab of the Parameters window, you can adjust the following parameters of the navigation sector:在Parameters窗口的Node选项卡中,可以调整导航扇区的以下参数:
Navigation Mask | The Navigation mask of the navigation sector must match the Navigation mask of the route that is calculated within it. Otherwise, the sector does not participate in pathfinding. By using the Navigation mask, you can specify sectors that must be ignored during pathfinding.导航扇区的Navigation掩码必须比赛在其中计算的路线的Navigation掩码。否则,该部门将不参与寻路。通过使用Navigation掩码,可以指定在寻路过程中必须忽略的扇区。 |
---|---|
Quality | Quality of optimization for route calculation. This value specifies the number of iterations that are used to find the shortcut. The higher the value, the longer the route calculation will take.路线计算的优化质量。此值指定用于查找快捷方式的迭代次数。值越高,路线计算将花费的时间越长。 |
Velocity | Scaling factor for velocity of the point that moves inside the navigation sector along the calculated route.沿计算的路线在导航扇区内移动的点的速度的比例因子。 |
Dangerous |
Danger factor that indicates if a moving point should try to avoid the navigation sector.危险因素,指示移动点是否应尽量避开导航区域。 If the danger factor exceeds the maximum danger factor set for the route, the navigation sector is excluded from pathfinding calculations.如果危险因素超过为路线设置的最大危险因素,则导航扇区将从寻路计算中排除。 |
Size | Size of the navigation sector's box along the axes.沿轴的导航扇形框的大小。 |