Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
🌐 English | Русский
Thunder Engine documentation
Thunder Engine documentation

Thunder Engine

  • Getting Started
    • Quick Start
    • Thunder Hub
    • Sample Projects
    • Thunder Engine Features
  • Editor
    • Viewport
    • Properties
    • Content Browser
    • Hierarchy
    • Plugin Manager
    • Building Project
  • Rendering
    • Camera
    • Geometry
      • Mesh Resource
      • MeshRender
      • SkinnedMeshRender
    • Lighting
    • Visual Effects (VFX)
      • VFX Editor
      • Creating Custom Modules
    • Graphics Pipeline
  • Audio
    • AudioClip
    • AudioSource
  • Scripting
    • Overview
    • Creating and Using Scripts
    • Variables and Property Editor
    • Instantiating Prefabs
    • Native Introspection
  • API Reference
    • Animation Module
      • Animation
      • PropertyAnimation
      • VariantAnimation
    • Bullet Module
      • BoxCollider
      • CapsuleCollider
      • CharacterController
      • Collider
      • MeshCollider
      • PhysicMaterial
      • RigidBody
      • SphereCollider
      • VolumeCollider
    • Components Module
      • Actor
      • Animator
      • AreaLight
      • Armature
      • BaseLight
      • Camera
      • Component
      • DirectLight
      • EffectRender
      • FixedJoint
      • HingeJoint
      • Joint
      • MeshRender
      • NativeBehaviour
      • PlayerInput
      • PointLight
      • PostProcessVolume
      • Renderable
      • Scene
      • SkinnedMeshRender
      • SkinnedSpriteRender
      • Spline
      • SpotLight
      • SpringJoint
      • SpriteRender
      • TextRender
      • TileMapRender
      • Transform
      • World
    • Core Module
      • Bson
      • Event
      • Json
      • MetaEnum
      • MetaMethod
      • MetaObject
      • MetaProperty
      • MetaType
      • MethodCallEvent
      • Object
      • ObjectSystem
      • TString
      • ThreadPool
      • Url
      • Variant
    • Engine Module
      • CommandBuffer
      • Engine
      • Gizmos
      • Input
      • Log
      • Module
      • PipelineContext
      • PipelineTask
      • System
      • Timer
    • Gui Module
      • AbstractButton
      • AbstractSlider
      • Button
      • Canvas
      • CheckBox
      • FloatInput
      • Foldout
      • Frame
      • Image
      • Label
      • Layout
      • LineEdit
      • Menu
      • ProgressBar
      • RectTransform
      • ScrollBar
      • Slider
      • Splitter
      • StyleSheet
      • Switch
      • TabBar
      • TabWidget
      • ToolButton
      • UiDocument
      • UiLoader
      • Widget
    • Math Module
      • AABBox
      • Matrix3
      • Matrix4
      • OBBox
      • Plane
      • Quaternion
      • Ray
      • Vector2
      • Vector3
      • Vector4
    • Media Module
      • AudioClip
      • AudioSource
    • Navigation Module
      • NavMesh
      • NavMeshAgent
      • NavMeshLink
      • NavMeshObstacle
      • NavMeshSurface
    • Os Module
      • Backtrace
      • FileSystemWatcher
      • Process
      • ProcessEnvironment
      • Uuid
    • Resources Module
      • AnimationClip
      • AnimationStateMachine
      • AnimationTrack
      • Bone
      • ComputeBuffer
      • ComputeInstance
      • ComputeShader
      • ControlScheme
      • Font
      • Map
      • Material
      • MaterialInstance
      • Mesh
      • Pipeline
      • Pose
      • Prefab
      • RenderTarget
      • Resource
      • Sprite
      • Text
      • Texture
      • TileMap
      • TileSet
      • Translator
      • VisualEffect
    • NetworkAddress
    • WebRequest

Get Involved

  • Contribute Documentation
    • Documentation Writing Guide
    • Documentation Style Guide
    • Documentation Review Process
    • Building Thunder Engine from Source
  • Documentation Localization
Back to top
View this page

NavMeshΒΆ

Inherited: Resource

DescriptionΒΆ

A navigation mesh resource owns the Detour mesh and its query object. It can load and save serialized tile data and provides access to the mesh, query object, and tile reference used by the navigation system.

Public MethodsΒΆ

NavMesh ()

~NavMesh ()

void

cleanup ()

void

loadUserData (const VariantMap & data)

dtNavMesh *

navMesh () const

dtNavMeshQuery *

query () const

VariantMap

saveUserData () const

bool

setData (const ByteArray & data)

dtTileRef

tileRef (int tileX, int tileY) const

Static MethodsΒΆ

None

Methods DescriptionΒΆ

NavMesh::NavMesh ()

Constructs an empty navigation mesh resource.


NavMesh::~NavMesh ()

Destroys the navigation mesh resource and releases its Detour objects.


void NavMesh::cleanup ()

Releases the Detour navigation mesh and query objects owned by the resource.


void NavMesh::loadUserData (VariantMap & data)

Reimplements: Object::loadUserData(const VariantMap &data).

Loads serialized navigation mesh tile data from resource user data.

The data map contains the serialized resource user data and its tile data.


dtNavMesh * NavMesh::navMesh () const

Returns the underlying Detour navigation mesh, or nullptr when it is not loaded.


dtNavMeshQuery * NavMesh::query () const

Returns the Detour navigation query object, or nullptr when it is not initialized.


VariantMap NavMesh::saveUserData () const

Reimplements: Object::saveUserData() const.

Saves the first available navigation mesh tile as resource user data.


bool NavMesh::setData (ByteArray & data)

Loads serialized Detour tile data into the navigation mesh.

The data replaces the currently loaded tile. The method returns true when it is added successfully, or false when the data is invalid or Detour rejects the tile.


dtTileRef NavMesh::tileRef (int tileX, int tileY) const

Returns the Detour reference for the tile at coordinates tileX and tileY.

Returns zero when the navigation mesh is not loaded or no tile exists at the requested coordinates.

Next
NavMeshAgent
Previous
Navigation Module
Copyright © 2026, Thunder Engine
Made with Sphinx and @pradyunsg's Furo
On this page
  • NavMesh
    • Description
    • Public Methods
    • Static Methods
    • Methods Description