Baltor Get started

Gallery / Godot components

AI perception with view cone, hearing and memory

In your harnessGodot componentMIT

Decide what a 2D agent sees (range, view cone, peripheral sense, optional occlusion check) and hears (radius times loudness), and remember targets with last known positions until a memory time runs out.

Files, names only

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

Full files in your harness.

What it takes and gives

Class
BaltorPerception, extends RefCounted
Methods
can_see(observer: Vector2, facing: Vector2, target: Vector2, occluded: Callable = Callable()) -> bool; can_hear(listener: Vector2, source: Vector2, loudness: float = 1.0) -> bool; observe(delta: float, observer: Vector2, facing: Vector2, targets: Dictionary, occluded: Callable = Callable()) -> void; report_noise(listener: Vector2, source: Vector2, loudness: float = 1.0) -> bool;…
Signals
target_spotted, target_lost, noise_heard
Placement
res://baltor/godot_components/perception_senses/

Limits. 2D only, with the view cone measured from a facing vector. Occlusion is whatever the Callable reports, such as a physics ray; nothing is cast by default. Hearing ignores walls. Target ids are StringNames. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.

Details

Kind
Godot component
Engine
Godot 4.3 or later
Files
11 files, 79.9 KB
Licence
MIT
Declared effects
reads files, runs commands
Checked with
Godot 4.7.2, headless
Checks
godot parse check only, godot gdscript tests, godot tests reject gutted component, godot editor import, godot contract reflection, godot readme usage compiles
Techniques
field of view cone test, sensory memory with decay
Tags
ai, perception, vision cone, hearing, stealth, memory
Identity
library.supply.creative_originals.211be36ce7b45bf70bf9016b.78e585ec86535c29
Version
78e585ec86535c29cac502fc3ff3be540e198a9692b10d7215995d8bba4760df

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.