障碍胶囊
The Obstacle Capsule is a capsule-shaped obstacle that is detected and bypassed by other objects during pathfinding. The Obstacle Capsule can be added, for example, for the capsule-shaped nodes (trunks, columns, chimney shafts and so on) that are placed inside a navigation area and should be bypassed.Obstacle Capsule是一个胶囊状的障碍物,在寻路过程中会被其他物体检测到并绕过。例如,可以将Obstacle Capsule添加到放置在导航区域内且应绕开的胶囊状节点(树干,圆柱,烟囱井筒等)上。
The size of the Obstacle Capsule is set using the following parameters:使用以下参数设置Obstacle Capsule的大小:
- Radius — the radius of the cylinder and hemispheres of the capsule.Radius —圆柱体的半径和胶囊的半球。
- Height — the height of the cylinder of the capsule.Height —胶囊圆柱体的高度。
See also也可以看看#
- The ObstacleCapsule class to manage capsule obstacles via APIObstacleCapsule类,用于通过API管理胶囊障碍物
- The PathRoute class to create 2D and 3D routes among obstaclesPathRoute类可在障碍物之间创建2D和3D路线
- The article on Creating Routes的文章创建路线
- A set of articles on Navigation Areas一系列文章导航区
A set of samples located in the data/samples/paths folder:位于data/samples/paths文件夹中的一组样本:
- obstacle_00
- route_01
- route_02
Adding Obstacle Capsule添加障碍胶囊#
To add an Obstacle Capsule to the scene via UnigineEditor:通过UnigineEditor将Obstacle Capsule添加到场景中:
- Run UnigineEditor.跑步UnigineEditor。
On the Menu bar, click Create -> Navigation -> Obstacle Capsule.在菜单栏上,单击Create -> Navigation -> Obstacle Capsule。
Click somewhere in the world to place the obstacle.单击世界上的某个地方以放置障碍物。
A new Obstacle Capsule is added to UnigineEditor and you can edit it via the Parameters window. See also the example on obstacle usage.新的Obstacle Capsule已添加到UnigineEditor,您可以通过Parameters窗口对其进行编辑。另请参阅例子关于障碍物的使用。
Editing Obstacle Capsule编辑障碍物胶囊#
On the Node tab of the Parameters window, you can adjust the following parameters of the Obstacle Capsule: 在Parameters窗口的Node选项卡上,可以调整Obstacle Capsule的以下参数:
Obstacle Mask | The Obstacle mask of the Obstacle Capsule must match the Obstacle mask of the route that is calculated during pathfinding. Otherwise, the obstacle is not taken into account during pathfinding. Also by using the Obstacle mask, you can specify Obstacle Capsule that should be ignored during pathfinding.Obstacle Capsule的Obstacle掩码必须比赛在寻路过程中计算的路线的Obstacle掩码。否则,在寻路过程中不会考虑障碍物。同样,通过使用Obstacle掩码,您可以指定在寻路过程中应忽略的Obstacle Capsule。 |
---|---|
Radius | Radius of the capsule, in units.Obstacle Capsule的半径,以单位为单位。 |
Height | Height of the capsule, in units.Obstacle Capsule的高度,以单位为单位。 |