/hip:godot-2d-movementfrom hip
Godot 4.7 CharacterBody2D movement in GDScript: platformer run and jump, top-down 8-direction motion, slopes and one-way platforms, with a headless landing test. Use when a 2D controller will not move, falls through the floor or is_on_floor() is always false. Not for coyote time and jump feel (`platformer`), RigidBody2D, raycasts or 3D (`godot-physics`) or tile levels (`godot-tilemap`).
Ships in hip. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Write CharacterBody2D controllers that land, run, jump and slide the way the engine expects,
then prove it with a headless test. Targets Godot 4.7; check config/features in
project.godot and keep an older project on its own version.
.tscn: the root should be a CharacterBody2D
with a CollisionShape2D/CollisionPolygon2D child, and the action names the script uses
must exist under [input] in project.godot.MOTION_MODE_GROUNDED; top-down
games set MOTION_MODE_FLOATING, which has no floor, wall or ceiling.velocity, then call move_and_slide() once per _physics_process(). It takes no
arguments, applies the physics delta itself, and writes back the velocity after collisions.is_on_floor(), is_on_wall(), get_wall_normal(),
get_slide_collision(i). They describe the last move_and_slide(), not the current frame.platformer; this skill supplies the Godot hooks they read (is_on_floor(), velocity).godot-nodes-scenes is installed, run python3 ../godot-nodes-scenes/scripts/check_godot_project.py <project>
after adding or moving scenes and scripts; fix every ERROR.assets/test_character_controller.gd to res://tests/, set the action names at
the top to the project's, and run
godot --headless --path <project> --script res://tests/test_character_controller.gd -- res://player.tscn.
Exit 0 means the body landed, jumped and ran (or, floating, moved on both axes without
drifting); each FAIL line names the behaviour that broke. On a fresh checkout run
godot --headless --path <project> --import first. To keep it in CI, use
godot-gdscript-headless-testing.extends CharacterBody2D
@export var speed := 200.0
@export var jump_velocity := -400.0
func _physics_process(delta: float) -> void:
if not is_on_floor():
velocity += get_gravity() * delta # project gravity plus any Area2D override
if Input.is_action_just_pressed("jump") and is_on_floor():
velocity.y = jump_velocity
var dir := Input.get_axis("move_left", "move_right")
if dir != 0.0:
velocity.x = dir * speed
else:
velocity.x = move_toward(velocity.x, 0.0, speed) # stops within one tick
move_and_slide()
For a tunable fall speed that ignores the project setting, replace get_gravity() with an
exported Vector2(0, gravity). For weight, ramp with move_toward(velocity.x, dir * speed, accel * delta); the reference has the full version.
extends CharacterBody2D
@export var speed := 220.0
func _ready() -> void:
motion_mode = CharacterBody2D.MOTION_MODE_FLOATING
func _physics_process(_delta: float) -> void:
# get_vector applies the action deadzones and caps the length at 1.
velocity = Input.get_vector("move_left", "move_right", "move_up", "move_down") * speed
move_and_slide()
func _physics_process(delta: float) -> void:
# ... set velocity ...
move_and_slide()
for i in get_slide_collision_count():
var other := get_slide_collision(i).get_collider()
if other and other.is_in_group("enemies"):
take_damage(1)
velocity was multiplied by delta. move_and_slide() already
scales by the physics step; only move_and_collide() takes a per-frame motion.is_on_floor() is always false → the body is in MOTION_MODE_FLOATING, up_direction
is not Vector2.UP, there is no collision shape, the floor's layer is not in this body's
mask, or move_and_slide() has not run yet this tick (it reports the last call).position += or
global_position =, which skips collision. Move through velocity only; teleport only for
respawns._process(). Use
_physics_process(); for smooth visuals at high refresh rates turn on
physics/common/physics_interpolation rather than moving the body in _process().floor_stop_on_slope on (default) and raise
floor_snap_length (default 1 px) so the body sticks when walking downhill. Slopes steeper
than floor_max_angle (default 45°) count as walls.move_and_slide(velocity, Vector2.UP) is gone; set
velocity and up_direction as properties and call move_and_slide() with no arguments.The InputMap action "jump" doesn't exist in the log, and the character ignores input →
the action is missing from project.godot. The bundled test adds blank actions it cannot
find and prints a note: line, so it can pass while the game fails; read the notes and fix
the Input Map.references/controller-recipes.md for one-way platforms (including the 4.7
one_way_collision_direction), moving platforms, move_and_collide() bounces, acceleration
ramps and the main CharacterBody2D properties.assets/test_character_controller.gd is the headless behaviour test used in step 6.platformer: coyote time, jump buffering, variable jump and jump feel on top of Pattern 1.godot-physics: collision layers and masks, areas, raycasts, rigid bodies, 3D characters.physics-tuning: engine-neutral tunnelling and jitter diagnosis.godot-animation: driving sprites and state machines from velocity and floor state.camera-systems: a follow camera for this character.godot-gdscript-headless-testing: running the controller test in CI.Last verified: 2026-11-11 against the Godot 4.7.2 class reference and a 4.7.2 headless run.
CollisionShape2D/CollisionPolygon2D.one_way_collision_direction is new in 4.7 (default
Vector2(0, 1)); earlier versions always block from the shape's local up side.get_gravity() on physics bodies exists since 4.3.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub definitely-stable/heavenisprey --plugin hip21 skills in this plugin
/create-game-assetsPlans, generates or sources, and validates consistent game art: style guides, sprites, pixel art, tilesets, icons and textures, with QA and licence records. Use when making or AI-generating game art, fixing fake transparency, or checking Steam AI disclosure. Not for engine import (`godot-tilemap`, `godot-animation`, `unity-tilemap-2d`), UI layout (`game-ui-ux`) or sound (`audio-design`).
/game-feelAdds engine-neutral juice to a working mechanic: trauma-based screen shake, hit-stop, eased tweens, squash and stretch, and knockback. Use when the game feels flat, weightless or not punchy, or hits and jumps should feel satisfying. Not for coyote time (`platformer`), input buffering (`input-systems`), camera follow (`camera-systems`) or HUD layout (`game-ui-ux`).
/game-ui-uxEngine-neutral design rules for game HUDs and menus: anchors and containers, scaling, safe areas, gamepad focus, HUDs driven by events instead of polling, and accessibility minimums. Use for menus, health bars or inventory screens that break on ultrawide or phones. Pair with `godot-ui-control` or `roblox-ui`. Not for button juice (`game-feel`) or rebinding (`input-systems`).
/godot-gdscriptGDScript 2.0 for Godot 4.7: static typing, @export and @onready, await and coroutines, and porting 3.x code. Use for .gd parse errors ("Cannot infer the type"), a coroutine that never resumes, a null @onready variable or upgrade breakage. Not for signals (`godot-signals-groups`), scenes (`godot-nodes-scenes`), C# (`godot-csharp`) or CI tests (`godot-gdscript-headless-testing`).
/godot-gdscript-headless-testingRuns Godot 4.7 GDScript tests with godot --headless and a SceneTree runner that exits non-zero on failure, so CI can gate merges. Owns Godot tests in CI. Use for GitHub Actions jobs or a headless run that hangs or exits 0 despite SCRIPT ERROR lines. Not for export in CI (`godot-export`), GDScript language (`godot-gdscript`) or Unity tests (`unity-csharp-scripting`).
/godot-nodes-scenesGodot 4.7 scene-tree structure: reusable .tscn scenes, instantiate(), autoloads and a checker for broken res:// paths and uids. Use when spawning bullets or enemies, or on "Node not found", "previously freed instance" or scenes broken after files moved, even if the user only says the project broke. Not for GDScript syntax (`godot-gdscript`) or signals (`godot-signals-groups`).