障碍物箱
The Obstacle Box node is a cuboid-shaped obstacle that is detected and bypassed by other objects during pathfinding. The Obstacle Box can be added, for example:Obstacle Box节点是一个长方体形的障碍物,在寻路过程中被其他对象检测到并绕过了该障碍物。可以添加Obstacle Box,例如:
- For the cuboid-shaped nodes (buildings, old-fashioned cars, fences and so on) that are placed inside a navigation area and should be bypassed对于放置在导航区域内且应绕开的长方体形节点(建筑物,老式汽车,围栏等)
- For the areas (rivers, swimming pools and so on) that should be bypassed对于应绕开的区域(河流,游泳池等)
See also也可以看看#
- The ObstacleBox class to manage box obstacles via APIObstacleBox类,用于通过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 <UnigineSDK>/data/samples/paths folder:位于<UnigineSDK>/data/samples/paths文件夹中的一组样本:
- obstacle_00
- route_01
- route_02
Adding Obstacle Box添加障碍物盒#
To add an Obstacle Box to the scene via UnigineEditor:通过UnigineEditor将Obstacle Box添加到场景中:
- Run UnigineEditor.跑步UnigineEditor。
On the Menu bar, click Create -> Navigation -> Obstacle Box.在菜单栏上,单击Create -> Navigation -> Obstacle Box。
Click somewhere in the world to place the obstacle.单击世界上的某个地方以放置障碍物。
A new Obstacle Box is added to UnigineEditor, and you can edit it via the Parameters window. See also the example on Obstacle Box usage.新的Obstacle Box已添加到UnigineEditor,您可以通过Parameters窗口对其进行编辑。另请参阅例子在Obstacle Box用法上。
Editing Obstacle Box编辑障碍物框#
In the Node tab of the Parameters window, you can adjust the following parameters of the Obstacle Box: 在Parameters窗口的Node选项卡中,可以调整Obstacle Box的以下参数:
Obstacle Mask | The Obstacle mask of the Obstacle Box 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 Boxes that should be ignored during pathfinding.Obstacle Box的Obstacle掩码必须比赛在寻路过程中计算的路线的Obstacle掩码。否则,在寻路过程中不会考虑障碍物。同样,通过使用Obstacle掩码,您可以指定在寻路过程中应忽略的Obstacle Boxes。 |
---|---|
Size | Size of the Obstacle Box along the axes, in units.沿轴的Obstacle Box大小,以单位为单位。 |