godot-characterbody-2d

Installation
SKILL.md

CharacterBody2D Implementation

Expert CharacterBody2D feel systems — not beginner move_and_slide tutorials.

NEVER Do

  • NEVER use RigidBody2D for standard player controllers — RigidBody is for physics-simulated objects. For responsive, feel-driven player movement, always use CharacterBody2D.
  • NEVER multiply velocity by delta before move_and_slide()move_and_slide() handles delta internally. Manual multiplication makes movement framerate-dependent.
  • NEVER use global_position updates for gameplay movement — Use velocity + move_and_slide(). Direct position hacks bypass collision, floor snap, and one-way rules.
  • NEVER "fall through" one-ways by nudging position.y — Use one-way collision shapes + layer/mask (and temporary mask disable / collide-with-areas patterns). See godot-2d-physics.
  • NEVER ignore floor/wall/ceiling state right after move_and_slide()is_on_floor(), is_on_wall(), is_on_ceiling(), and slide collisions drive coyote, wall jump, and bonk logic.
  • NEVER rely on default floor_snap_length for fast stair-climbing — Default snapping is too small for high-velocity characters. Use custom raycast-based stair logic.
  • NEVER apply gravity while is_on_floor() is true — Constant downward force causes micro-jitter and fights floor-snap. Reset velocity.y on land.
  • NEVER use Area2D as primary ground detection — Prefer is_on_floor() / shapecasts; Areas are for triggers, not floor truth.
  • NEVER forget ceiling bonk — Reset velocity.y when is_on_ceiling() or the player floats into the ceiling until gravity wins.
  • NEVER round physics positions for pixel art — Keep physics high-precision; round sprite positions in _process only (subpixel_movement_rounding.gd).
  • NEVER spam queue_free() for hordes — Pool bullets/enemies when spawn/despawn is frequent (performance_character_pooling.gd).

Installs
336
GitHub Stars
600
First Seen
Feb 10, 2026
godot-characterbody-2d — thedivergentai/gd-agentic-skills