This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
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
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine.NavigationMesh Class

Inherits from: Navigation

This class enables to create a navigation area above the surface of an arbitrary mesh. In fact, the navigation mesh is the area of the specified height above the mesh polygons, which is available for pathfinding.

Notice
A mesh used as a base for the navigation mesh should meet the requirements described here.

See Also#

  • The article on Navigation Mesh
  • A set of samples located in the data/samples/paths folder:
    1. mesh_00
    2. route_03
  • Navigation sample in C# Component Samples suite

NavigationMesh Class

Properties

string MeshPath#

The Path to the .mesh-file used as the base for the navigation mesh.

float Height#

The distance above the navigation mesh polygons that is available for pathfinding. by default, the height is set to 1.

int Depth#

The depth value, which is an integer value in range [0;4]. The larger the depth value, the better control over accuracy and speed of route calculation is provided.

Members


NavigationMesh ( ) #

Constructor. Creates an empty navigation mesh.

NavigationMesh ( string arg1 ) #

Creates a navigation mesh from the given *.mesh file.

Arguments

  • string arg1 - Path to the *.mesh file.

int SetMesh ( Mesh mesh ) #

Copies a given mesh into the mesh, on which the current navigation mesh is based.

Arguments

  • Mesh mesh - Mesh to be copied.

Return value

1 if the mesh is copied successfully; otherwise, 0.

int GetMesh ( Mesh mesh ) #

Copies the mesh that is used as a base for the current navigation mesh into the received mesh.
Notice
A mesh used as a base for the navigation mesh should meet the requirements described here.

Arguments

  • Mesh mesh - A mesh into which the current mesh is copied.

Return value

1 if the mesh is copied successfully; otherwise, 0.

bool SetMeshPath ( string path, bool force_load = 0 ) #

Sets a new path for the mesh used as a base for the navigation mesh and forces loading of the mesh with the new path for the current navigation mesh.

Arguments

  • string path - Path to the .mesh-file to be set.
  • bool force_load - Force flag.
    • If 1 is specified, the mesh with the new path will be loaded immediately.
    • If 0 is specified, only the mesh path will be updated.

Return value

true if:
  • The current mesh path coincides the new path.
  • The mesh with the new path has been loaded successfully.
  • The force flag is set to 0.
In other cases, false.

int LoadMesh ( string path ) #

Loads a mesh, on which the navigation mesh is based, from the file. This function doesn't change the mesh name.

Arguments

  • string path - A relative path to the *.mesh file.

Return value

1 if the mesh is loaded successfully; otherwise, 0.

int SaveMesh ( string path ) #

Saves the mesh, on which the navigation mesh is based, to the file.

Arguments

  • string path - A relative path to the *.mesh file.

Return value

1 if the mesh is saved successfully; otherwise, 0.

static int type ( ) #

Returns the type of the node.

Return value

Navigation type identifier.
Last update: 2024-04-19
Build: ()