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

NavMeshObstacleΒΆ

Inherited: NativeBehaviour

DescriptionΒΆ

A navigation obstacle prevents agents from using the space occupied by its shape. The obstacle can be represented by a cylinder or a box and is automatically re-registered when its transform or geometry changes.

Public MethodsΒΆ

NavMeshObstacle ()

~NavMeshObstacle ()

float

height () const

float

radius () const

void

registerObstacle ()

void

setEnabled (bool enabled)

void

setHeight (float height)

void

setRadius (float radius)

void

setShape (int shape)

void

setSize (const Vector3 & size)

int

shape () const

Vector3

size () const

void

unregisterObstacle ()

void

update ()

Public EnumsΒΆ

enum NavMeshObstacle::Shape

Defines the geometric shape used by the navigation obstacle.

Constant

Value

Description

NavMeshObstacle::Cylinder

0

A cylindrical obstacle described by radius() and height().

NavMeshObstacle::Box

1

A box obstacle described by size().

Static MethodsΒΆ

None

Methods DescriptionΒΆ

NavMeshObstacle::NavMeshObstacle ()

Constructs a navigation obstacle with a cylindrical shape.


NavMeshObstacle::~NavMeshObstacle ()

Destroys the navigation obstacle and unregisters it from NavigationSystem.


float NavMeshObstacle::height () const

Returns the height of the obstacle.

See also setHeight().


float NavMeshObstacle::radius () const

Returns the radius of a cylindrical obstacle.

See also setRadius().


void NavMeshObstacle::registerObstacle ()

Registers the obstacle in NavigationSystem when it is not registered yet.


void NavMeshObstacle::setEnabled (bool enabled)

Reimplements: Component::setEnabled(bool enabled).

Enables or disables the obstacle.

An enabled value registers the obstacle in NavigationSystem, while a disabled value removes it from the navigation system while retaining its configuration.


void NavMeshObstacle::setHeight (float height)

Sets the height of the obstacle.

The height value sets the new size in world units and re-registers the obstacle in NavigationSystem.

See also height().


void NavMeshObstacle::setRadius (float radius)

Sets the radius of a cylindrical obstacle.

The radius value sets the new size in world units and re-registers the obstacle in NavigationSystem.

See also radius().


void NavMeshObstacle::setShape (int shape)

Sets the geometric shape of the obstacle.

The shape value selects the geometry used by the obstacle. Invalid values are ignored, and a changed value re-registers the obstacle in NavigationSystem.

See also shape().


void NavMeshObstacle::setSize (Vector3 & size)

Sets the size of a box-shaped obstacle.

The size value sets the box dimensions in world units and re-registers the obstacle in NavigationSystem.

See also size().


int NavMeshObstacle::shape () const

Returns the geometric shape of the obstacle.

See also setShape().


Vector3 NavMeshObstacle::size () const

Returns the size of a box-shaped obstacle.

See also setSize().


void NavMeshObstacle::unregisterObstacle ()

Removes the obstacle from NavigationSystem when it is registered.


void NavMeshObstacle::update ()

Reimplements: NativeBehaviour::update().

Updates the registered obstacle when its world position changes.

Next
NavMeshSurface
Previous
NavMeshLink
Copyright © 2026, Thunder Engine
Made with Sphinx and @pradyunsg's Furo
On this page
  • NavMeshObstacle
    • Description
    • Public Methods
    • Public Enums
    • Static Methods
    • Methods Description