What this component contains
ATTRIBUTION.mdLICENSEREADME.mdbaltor_test.gdcomponent.jsoninspect_gdscript.pypotential_field.gdrun_tests.gdtest_package.pytests/test_potential_field.gdverification/native.json
How it works
- Class
- BaltorPotentialField, extends RefCounted
- Methods
- add_attractor(point: Vector2, strength: float = 1.0) -> void; add_repulsor(point: Vector2, strength: float, influence_radius: float) -> void; clear() -> void; potential_at(point: Vector2) -> float; force_at(point: Vector2) -> Vector2; follow(start: Vector2, step_length: float, max_steps: int = 500, goal_radius: float = 1.0, min_force: float = 0.001) -> Dictionary
- Placement
- res://baltor/godot_components/potential_field/
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
Local method: it can stall in local minima, for example when an obstacle sits exactly between agent and goal; follow() reports that instead of hiding it. Point obstacles with a radius only. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.