← All examples

godot components

Steering behaviors: seek, flee, arrive, pursue, evade, wander

Compute Reynolds-style steering forces for 2D agents (seek, flee with a panic distance, arrive with a slowing radius, pursue and evade with prediction, seeded wander) and integrate a point mass with force and speed limits.

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • baltor_test.gd
  • component.json
  • inspect_gdscript.py
  • run_tests.gd
  • steering_behaviors_2d.gd
  • test_package.py
  • tests/test_steering_behaviors_2d.gd
  • verification/native.json

How it works

Class
BaltorSteering, extends RefCounted
Methods
seek(position: Vector2, velocity: Vector2, target: Vector2, max_speed: float) -> Vector2; flee(position: Vector2, velocity: Vector2, threat: Vector2, max_speed: float, panic_distance: float = INF) -> Vector2; arrive(position: Vector2, velocity: Vector2, target: Vector2, max_speed: float, slowing_radius: float) -> Vector2; pursue(position: Vector2, velocity: Vector2, target_position: Vector2,…
Placement
res://baltor/godot_components/steering_behaviors_2d/

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • godot_parse_check_only
  • godot_gdscript_tests
  • godot_tests_reject_gutted_component
  • godot_editor_import
  • godot_contract_reflection
  • godot_readme_usage_compiles

Limits to consider

Point-mass model in 2D; no obstacle handling (see obstacle avoidance) and no orientation smoothing. Arrive is an underdamped approach and can overshoot slightly before settling. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.