Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
SimVX documentation
SimVX documentation

Getting Started

  • Installation
  • Quick Start
  • Architecture
  • Godot Comparison
  • Building a Simple Game with the SimVX Editor

Core Engine

  • Core Engine
  • Node System
  • Animation
  • SimVX Audio System
  • UI System
  • Math Types
  • Collision & Physics
  • Scenes & Serialization
  • Particles
  • TileMap
  • Navigation
  • Skeleton
  • Physics Engine

Graphics Backend

  • Graphics Backend
  • App Class
  • Visual Testing

API Reference

  • API Reference
    • simvx.core
      • simvx.core.physics
        • simvx.core.physics.engine
      • simvx.core.debug
        • simvx.core.debug.overlay
        • simvx.core.debug.ui_inspector
        • simvx.core.debug.profiler
      • simvx.core.ui
        • simvx.core.ui.core
        • simvx.core.ui.virtual_scroll
        • simvx.core.ui.terminal
        • simvx.core.ui.code_edit
        • simvx.core.ui.tabs
        • simvx.core.ui.toolbar
        • simvx.core.ui.clipboard
        • simvx.core.ui.split
        • simvx.core.ui.graph_edit
        • simvx.core.ui.testing
        • simvx.core.ui.menu
        • simvx.core.ui.color_picker
        • simvx.core.ui.containers
        • simvx.core.ui.tree
        • simvx.core.ui.dock
        • simvx.core.ui.rich_text
        • simvx.core.ui.scroll
        • simvx.core.ui.file_dialog
        • simvx.core.ui.ansi_parser
        • simvx.core.ui.widgets
        • simvx.core.ui.multiline
        • simvx.core.ui.tooltip
        • simvx.core.ui.advanced
      • simvx.core.text
        • simvx.core.text.msdf
        • simvx.core.text.font
      • simvx.core.math
        • simvx.core.math.matrices
        • simvx.core.math.types
      • simvx.core.graphics
        • simvx.core.graphics.material
        • simvx.core.graphics.shader
        • simvx.core.graphics.mesh
      • simvx.core.audio_bus
      • simvx.core.selection
      • simvx.core.engine
      • simvx.core.backend
      • simvx.core.animation
      • simvx.core.particles
      • simvx.core.skeleton
      • simvx.core.scene
      • simvx.core.export
      • simvx.core.gizmo
      • simvx.core.navigation3d
      • simvx.core.noise
      • simvx.core.collision
      • simvx.core.tilemap
      • simvx.core.clipboard
      • simvx.core.resource
      • simvx.core.testing
      • simvx.core.particle_trail
      • simvx.core.document
      • simvx.core.hot_reload
      • simvx.core.scripted_demo
      • simvx.core.light2d
      • simvx.core.project
      • simvx.core.process_node
      • simvx.core.math_types
      • simvx.core.audio
      • simvx.core.easing
      • simvx.core.undo
      • simvx.core.navigation
      • simvx.core.render_queue
      • simvx.core.shortcuts
      • simvx.core.resource_loader
      • simvx.core.i18n
      • simvx.core.input
      • simvx.core.viewport
    • simvx.graphics
      • simvx.graphics.assets
        • simvx.graphics.assets.scene_import
        • simvx.graphics.assets.cubemap_loader
        • simvx.graphics.assets.mesh_loader
        • simvx.graphics.assets.image_loader
      • simvx.graphics.platform
      • simvx.graphics.picking
        • simvx.graphics.picking.pick_pass
        • simvx.graphics.picking.raycast_utils
        • simvx.graphics.picking.raycast
      • simvx.graphics.renderer
        • simvx.graphics.renderer.deferred
        • simvx.graphics.renderer.tilemap_pass
        • simvx.graphics.renderer.outline_pass
        • simvx.graphics.renderer.gpu_batch
        • simvx.graphics.renderer.gizmo_pass
        • simvx.graphics.renderer.particle_compute
        • simvx.graphics.renderer.grid_pass
        • simvx.graphics.renderer.draw2d_pass
        • simvx.graphics.renderer.light2d_pass
        • simvx.graphics.renderer.passes
        • simvx.graphics.renderer.viewport_manager
        • simvx.graphics.renderer.particle_pass
        • simvx.graphics.renderer.mesh_registry
        • simvx.graphics.renderer.forward_plus
        • simvx.graphics.renderer.shadow_pass
        • simvx.graphics.renderer.color_grading
        • simvx.graphics.renderer.text_pass
        • simvx.graphics.renderer.skybox_pass
        • simvx.graphics.renderer.point_shadow_pass
        • simvx.graphics.renderer.forward
        • simvx.graphics.renderer.bloom_pass
        • simvx.graphics.renderer.render_target
        • simvx.graphics.renderer.ibl_pass
        • simvx.graphics.renderer.transparency
        • simvx.graphics.renderer.post_process
        • simvx.graphics.renderer.ssao_pass
        • simvx.graphics.renderer.fog_pass
      • simvx.graphics.gpu
        • simvx.graphics.gpu.swapchain
        • simvx.graphics.gpu.sync
        • simvx.graphics.gpu.descriptors
        • simvx.graphics.gpu.commands
        • simvx.graphics.gpu.pipeline
        • simvx.graphics.gpu.memory
        • simvx.graphics.gpu.device
        • simvx.graphics.gpu.instance
      • simvx.graphics.ui
        • simvx.graphics.ui.ui_pass
      • simvx.graphics.materials
        • simvx.graphics.materials.custom_shader
        • simvx.graphics.materials.texture
        • simvx.graphics.materials.material
        • simvx.graphics.materials.shader_compiler
      • simvx.graphics.scene
        • simvx.graphics.scene.frustum
        • simvx.graphics.scene.transforms
        • simvx.graphics.scene.lights
        • simvx.graphics.scene.camera
        • simvx.graphics.scene.draw_batch
      • simvx.graphics.engine
      • simvx.graphics.input_adapter
      • simvx.graphics.app
      • simvx.graphics.debug_draw
      • simvx.graphics.testing
      • simvx.graphics.draw2d
      • simvx.graphics.text_renderer
      • simvx.graphics.scene_adapter
    • simvx.editor
      • simvx.editor.panels
        • simvx.editor.panels.viewport3d
        • simvx.editor.panels.status_bar
        • simvx.editor.panels.scene_tree
        • simvx.editor.panels.animation
        • simvx.editor.panels.filesystem
        • simvx.editor.panels.file_browser
        • simvx.editor.panels.inspector
        • simvx.editor.panels.export_panel
        • simvx.editor.panels.animation_editor
        • simvx.editor.panels.code_editor
        • simvx.editor.panels.shader_editor
        • simvx.editor.panels.console
        • simvx.editor.panels.signal_editor
        • simvx.editor.panels.material_editor
        • simvx.editor.panels.project_settings
        • simvx.editor.panels.viewport2d
      • simvx.editor.play_mode
      • simvx.editor.templates
      • simvx.editor.plugin
      • simvx.editor.preferences
      • simvx.editor.app
      • simvx.editor.menus
      • simvx.editor.demo_steps
      • simvx.editor.project
      • simvx.editor.state
      • simvx.editor.main
      • simvx.editor.gizmo_controller
    • simvx.ide
      • simvx.ide.widgets
        • simvx.ide.widgets.status_bar
        • simvx.ide.widgets.autocomplete
        • simvx.ide.widgets.goto_line
        • simvx.ide.widgets.minimap
        • simvx.ide.widgets.confirm_dialog
        • simvx.ide.widgets.command_palette
      • simvx.ide.panels
        • simvx.ide.panels.terminal_panel
        • simvx.ide.panels.symbol_outline
        • simvx.ide.panels.settings_panel
        • simvx.ide.panels.output_panel
        • simvx.ide.panels.file_browser
        • simvx.ide.panels.debug_panel
        • simvx.ide.panels.problems_panel
        • simvx.ide.panels.search_panel
        • simvx.ide.panels.editor_panel
      • simvx.ide.dap
        • simvx.ide.dap.manager
        • simvx.ide.dap.client
      • simvx.ide.lint
        • simvx.ide.lint.runner
      • simvx.ide.lsp
        • simvx.ide.lsp.protocol
        • simvx.ide.lsp.client
      • simvx.ide.app
      • simvx.ide.state
      • simvx.ide.keybindings
      • simvx.ide.config
Back to top
View this page

Navigation¶

SimVX provides 2D pathfinding through graph-based A* (AStar2D), grid-based A* (AStarGrid2D), and a steering agent node (NavigationAgent2D).

Graph-Based A* (AStar2D)¶

Build an arbitrary waypoint graph and find shortest paths:

from simvx.core import AStar2D

astar = AStar2D()

# Add waypoints
astar.add_point(0, (0, 0))
astar.add_point(1, (100, 0))
astar.add_point(2, (100, 100))
astar.add_point(3, (50, 50), weight=2.0)  # Costlier to traverse

# Connect them
astar.connect_points(0, 1)  # Bidirectional by default
astar.connect_points(1, 2)
astar.connect_points(0, 3)
astar.connect_points(3, 2)

# Find path (returns world positions)
path = astar.get_point_path(0, 2)  # [(0,0), (100,0), (100,100)]

# Or get point IDs
id_path = astar.get_id_path(0, 2)  # [0, 1, 2]

Additional Operations¶

astar.set_point_disabled(3)           # Exclude from pathfinding
astar.disconnect_points(0, 1)         # Remove a connection
closest = astar.get_closest_point((45, 45))  # Nearest non-disabled point

Grid-Based A* (AStarGrid2D)¶

For tile-based games, AStarGrid2D manages a rectangular grid automatically:

from simvx.core import AStarGrid2D

grid = AStarGrid2D(width=20, height=20, cell_size=32.0, diagonal=True)

# Mark obstacles
grid.set_solid(5, 5)
grid.set_solid(5, 6)
grid.set_solid(5, 7)

# Set terrain cost (swamp = 3x slower)
grid.set_weight(10, 10, 3.0)

# Find path in grid coordinates
path = grid.find_path((0, 0), (19, 19))  # [(0,0), (1,1), ...]

# Or use world positions (auto-converts via cell_size)
world_path = grid.find_path_world((16.0, 16.0), (624.0, 624.0))

NavigationAgent2D¶

A node that follows computed paths with built-in steering. Assign a pathfinder, set a target, and the agent moves each physics frame:

from simvx.core import NavigationAgent2D, AStarGrid2D, Vec2

grid = AStarGrid2D(50, 50, cell_size=16.0)

class Enemy(NavigationAgent2D):
    max_speed = 120.0
    path_desired_distance = 4.0

    def ready(self):
        self.set_navigation(grid)
        self.navigation_finished.connect(self._on_arrived)
        self.target_position = Vec2(400, 300)

    def _on_arrived(self):
        print("Reached destination!")

Properties¶

Property

Default

Description

max_speed

100.0

Maximum movement speed in units/sec

path_desired_distance

4.0

Distance to a waypoint before advancing to the next

Properties and Signals¶

  • target_position – Assigning this recomputes the path immediately.

  • velocity – Current velocity vector (read-only, computed each physics frame).

  • is_navigation_finished – True when the agent has reached its target.

  • navigation_finished – Signal emitted when the target is reached.

API Reference¶

See simvx.core.navigation for the complete navigation API.

Next
Skeleton
Previous
TileMap
Copyright © 2026, SimVX Contributors
Made with Sphinx and @pradyunsg's Furo
On this page
  • Navigation
    • Graph-Based A* (AStar2D)
      • Additional Operations
    • Grid-Based A* (AStarGrid2D)
    • NavigationAgent2D
      • Properties
      • Properties and Signals
    • API Reference