Path following steering on a polyline corridor
In your harnessGodot componentMIT
Keep a 2D agent inside a polyline corridor with predictive path following, and query the path: length, closest point, point at a distance and progress along it, for open and closed paths.
ATTRIBUTION.mdLICENSEREADME.mdbaltor_test.gdcomponent.jsoninspect_gdscript.pypath_follower_2d.gdrun_tests.gdtest_package.pytests/test_path_follower_2d.gdverification/native.json
Full files in your harness.
What it takes and gives
- Class
- BaltorPathFollower, extends RefCounted
- Methods
- set_points(points: PackedVector2Array, closed: bool = false) -> void; get_length() -> float; closest_point(point: Vector2) -> Dictionary; point_at_distance(distance: float) -> Vector2; steer(position: Vector2, velocity: Vector2, max_speed: float, lookahead: float = 0.5, ahead: float = 24.0) -> Vector2; progress_of(point: Vector2) -> float
- Placement
- res://baltor/godot_components/path_follower_2d/
Limits. Straight segments only; the closest-point search checks every segment, so very long paths cost more per query. An agent can swing wide of tight corners by about its turning radius. 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, 75.3 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
- predictive path following, point to segment projection, arc length parameterization
- Tags
- steering, path following, ai, racing line, patrol, polyline
- Identity
library.supply.creative_originals.c218eebffd398e493a650e2b.cdacdb0ea0af2924- Version
cdacdb0ea0af2924bea9850cd1e72c3af53f8eec167493c396429ed76375e963
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.