This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine.Navigation Class

Inherits: Node
Warning
3D navigation feature is experimental and not recommended for production use.

This class contains functions that enable to get or change parameters of a navigation area within which pathfinding is performed. The navigation area can be either a navigation sector or a navigation mesh.

For example, by using the functions of this class, you can scale velocity of the point moving inside the navigation area. Or you can change the danger factor of the area.

See Also#

  • Articles of the Navigation Area section
  • A set of UnigineScript API samples located in the <UnigineSDK>/data/samples/paths/ folder

Navigation Class

Properties

float Velocity#

The current scaling factor for velocity of the point that moves inside the navigation area along the calculated route.
set
Sets a scaling factor for velocity of the point that moves inside the navigation area along the calculated route.
set value - A velocity scaling factor.

int Quality#

The quality of optimization of the route that has already been calculated. the quality value specifies the number of iterations that are used for taking the short cut.
set
Sets a quality of optimization of the route that has already been calculated. This value specifies the number of iterations that are used for taking the short cut. However, the higher the value, the longer the route calculation will take.
set value - A quality value. If a negative value is provided, 0 will be used instead.

int NumNavigations#

The number of navigation areas that intersect the current one.

int NavigationMask#

The current navigation mask of the navigation area. the navigation mask of the navigation area must match the navigation mask of the route that is calculated within it. Otherwise, the area will not participate in pathfinding.
set
Sets a navigation mask for the navigation area. The navigation mask of the navigation area must match the navigation mask of the route that is calculated within it. Otherwise, the area will not participate in pathfinding. By using the navigation mask, you can specify navigation ares that must be ignored during pathfinding.
set value - An integer value, each bit of which is used to set a mask.

float Dangerous#

The current danger factor that indicates if the point that moves inside the navigation area should try to avoid this area.
Notice
If the danger factor exceeds the maximum danger factor set for the route, the navigation area will be excluded from pathfinding calculations.
set
Sets the danger factor that indicates if the point that moves inside the navigation area should try to avoid this area.
Notice
If the danger factor exceeds the maximum danger factor set for the route, the navigation area will be excluded from pathfinding calculations.
set value - Danger factor.

Members


Navigation GetNavigation ( int num ) #

Returns the specified connected navigation area.

Arguments

  • int num - The navigation area number.

Return value

The navigation area.

Navigation GetNavigation ( ) #

Returns the specified connected navigation area.

Return value

The navigation area.

int Inside ( Navigation navigation ) #

Arguments

  • Navigation navigation

int Inside2D ( vec3 point, float radius ) #

Depending on the type of the navigation area, the function performs the following:
  • For navigation sectors, it checks whether the given point is inside the navigation sector. The height of the navigation sector (Z coordinate) is ignored.
  • For navigation meshes, it checks whether the given point is inside the navigation mesh and the distance from the point to the mesh is in range [-height;height]. Here height is a height of the navigation mesh.

Arguments

  • vec3 point - Point coordinates.
  • float radius - The radius of the point. The radius is used to exclude exceeding the navigation mesh by the point. If the radius is set, it is more likely that the point will be inside the navigation mesh.
    Notice
    When calling the function for NavigationSector, this option is irrelevant.

Return value

1 if the point is inside the navigation area; otherwise, 0.

int Inside3D ( vec3 point, float radius ) #

Depending on the type of the navigation area, the function performs the following:
  • For navigation sectors, it checks whether the given point is inside the navigation area. Notice that the height of the navigation sector (Z coordinate) is also taken into account.
  • For navigation meshes, it checks whether the given point is inside the navigation mesh and the distance from the point to the mesh is in range [0;height]. Here height is a height of the navigation mesh.

Arguments

  • vec3 point - Point coordinates.
  • float radius - The radius of the point. The radius is used to exclude exceeding the navigation mesh by the point. If the radius is set, it is more likely that the point will be inside the navigation mesh.
    Notice
    When calling the function for NavigationSector, this option is irrelevant.

Return value

1 it the point is inside the navigation area; otherwise, 0.
Last update: 2020-11-24
Build: ()