障碍球
The Obstacle Sphere is a sphere-shaped obstacle that is detected and bypassed by other objects during pathfinding. The Obstacle Sphere can be added, for example:Obstacle Sphere是球形障碍物,在寻路过程中被其他对象检测到并绕过。可以添加Obstacle Sphere,例如:
- For the sphere-shaped nodes (huge boulders, bushes and so on) that are placed inside a navigation area and should be bypassed对于放置在导航区域内且应绕开的球形节点(巨大的巨石,灌木丛等)
- For the areas (lakes and so on) that should be bypassed对于应绕开的区域(湖泊等)
See also也可以看看#
- The ObstacleSphere class to manage sphere-shaped obstacles via APIObstacleSphere类,用于通过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 Sphere添加障碍球#
To add a sphere obstacle to the scene via UnigineEditor:要通过UnigineEditor向场景添加球体障碍,请执行以下操作:
- Run UnigineEditor.跑步UnigineEditor。
On the Menu bar, click Create -> Navigation -> Obstacle Sphere.在菜单栏上,单击Create -> Navigation -> Obstacle Sphere。
Click somewhere in the world to place the obstacle.单击世界上的某个地方以放置障碍物。
A new Obstacle Sphere is added to UnigineEditor and you can edit it via the Parameters window. See also the example on obstacle usage.新的Obstacle Sphere已添加到UnigineEditor,您可以通过Parameters窗口对其进行编辑。另请参阅例子关于障碍物的使用。
Editing Obstacle Sphere编辑障碍物球#
On the Node tab of the Parameters window, you can adjust the following parameters of the Obstacle Sphere: 在Parameters窗口的Node选项卡上,可以调整Obstacle Sphere的以下参数:
Obstacle Mask | The Obstacle mask of the Obstacle Sphere 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 Spheres that should be ignored during pathfinding.Obstacle Sphere的Obstacle掩码必须比赛在寻路过程中计算的路线的Obstacle掩码。否则,在寻路过程中不会考虑障碍物。同样,通过使用Obstacle掩码,您可以指定在寻路过程中应忽略的Obstacle Spheres。 |
---|---|
Radius | Radius of the Obstacle Sphere, in units.Obstacle Sphere的半径,以单位为单位。 |