What this component contains
ATTRIBUTION.mdLICENSEREADME.mdbaltor_test.gdcomponent.jsoninspect_gdscript.pyobstacle_avoidance_2d.gdrun_tests.gdtest_package.pytests/test_obstacle_avoidance_2d.gdverification/native.json
How it works
- Class
- BaltorObstacleAvoidance, extends RefCounted
- Methods
- ray_circle(origin: Vector2, direction: Vector2, center: Vector2, radius: float) -> float; find_threat(position: Vector2, velocity: Vector2, obstacles: PackedVector3Array, agent_radius: float, look_ahead: float) -> int; avoid(position: Vector2, velocity: Vector2, obstacles: PackedVector3Array, agent_radius: float, look_ahead: float, max_force: float) -> Vector2
- Placement
- res://baltor/godot_components/obstacle_avoidance_2d/
Recorded checks
godot 4.7.2.stable.official.ed1daf0bf
godot_parse_check_onlygodot_gdscript_testsgodot_tests_reject_gutted_componentgodot_editor_importgodot_contract_reflectiongodot_readme_usage_compiles
Limits to consider
Circle obstacles only, given as Vector3(x, y, radius); walls and polygons need another method. Avoids one obstacle at a time, so dense clusters can still trap an agent. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.