Baltor Get started

Gallery / Godot components

Ledge grab, hang and climb for 2D platformers

In your harnessGodot componentMIT

Find grabbable ledges with chest and head rays plus a downward ray for the top, hang from the corner, climb up along an up-then-forward path over a set time, or drop with a regrab cooldown.

Files, names only

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

Full files in your harness.

What it takes and gives

Class
BaltorLedgeGrab2D, extends Node
Methods
detect(chest_hit: bool, head_hit: bool, falling: bool) -> bool; probe_ledge(space: PhysicsDirectSpaceState2D, origin: Vector2, facing: float, exclude: Array[RID] = [], mask: int = 1) -> Dictionary; try_grab(corner: Vector2, facing: float, falling: bool) -> bool; climb() -> bool; drop() -> bool; advance(delta: float) -> Vector2; get_state() -> State; get_hang_position() -> Vector2; and 1 more
Signals
grabbed, climbed, dropped
Exports
hang_offset, climb_offset, climb_time, regrab_cooldown, chest_height, head_height, reach
Placement
res://baltor/godot_components/ledge_grab_2d/

Limits. Axis-aligned ledges; the corner uses the chest hit x and the top surface y. The owner moves the body to the returned positions and disables its own gravity while hanging or climbing. 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, 80.1 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
two-ray ledge detection, three-state hang and climb machine, piecewise linear climb path
Tags
platformer, ledge grab, climbing, movement, raycast, state machine
Identity
library.supply.creative_originals.bc7fc4b3dd9fe6f1b3e174bd.e80e61341bc71462
Version
e80e61341bc7146211233a56d60b03ed5794e42e4c6b325c210be5485267eb8c

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.