Godot Characterbody 2d logo

Godot Characterbody 2d

Community
thedivergentai
godot-characterbody-2d

Expert patterns for CharacterBody2D including platformer movement (coyote time, jump buffering, variable jump height), top-down movement (8-way, tank controls), collision handling, one-way platforms, and state machines. Use for player characters, NPCs, or enemies. Trigger keywords: CharacterBody2D, move_and_slide, is_on_floor, coyote_time, jump_buffer, velocity, get_slide_collision, one_way_platforms, state_machine.

Overview

Publisherthedivergentai
RepositoryGD-Agentic-Skills
Skill namegodot-characterbody-2d
Stars
727
Forks
43
Bundled files
17
LicenseLGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 17 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by thedivergentai on GitHub. Read the source before you install it.

Installation

Install the Godot Characterbody 2d AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git /tmp/GD-Agentic-Skills
mkdir -p .claude/skills
cp -r /tmp/GD-Agentic-Skills/skills/godot-characterbody-2d .claude/skills/godot-characterbody-2d
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Godot Characterbody 2d in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Godot Characterbody 2d on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Godot Characterbody 2d is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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).

When to Use CharacterBody2D

NeedBody
Feel-driven player / NPC / enemy locomotionCharacterBody2D
Rolling debris, ragdoll-ish props, force pilesRigidBody2D
Static level collidersStaticBody2D / TileMapLayer physics

Decision Tree → MANDATORY Scripts

TaskDo FirstThen (optional)Do NOT Load
Platformer foundation (coyote, buffer, accel/friction)expert_physics_2d.gdInline tutorial controllers
Isolate coyote/buffer onlyframe_perfect_coyote_time.gdDuplicate coyote blocks in SKILL
Variable jump / short hopvariable_jump_height.gd
Slopes / stairsslope_stair_snapping.gdgodot-raycasting-queries
Wall slide / wall jumpwall_slide_jump_refined.gd or wall_jump_controller.gdBoth unless comparing
Dash + i-framesdash_state_controller.gd or dash_controller.gdBoth unless comparing
Air control polishaerial_drift_acceleration.gd
Ceiling stick / bonkceiling_bonk_detection.gd
Knockback / wind impulsesimpulse_response_handler.gd
Pixel-art visualssubpixel_movement_rounding.gdRounding global_position in physics
Many AI bodiesperformance_character_pooling.gd
One-way platformsTile/StaticBody one-way + layers/masksgodot-tilemap-mastery / godot-2d-physicsposition.y += 1 drop-through hacks
Top-down / tank locomotionmovement-recipes.mdInline 8-way tutorials
Jump arc debug tuninggame_feel_profiler.gd
Animation root motionroot_motion_controller.gdgodot-2d-animation

Golden path: Read expert_physics_2d.gd first. Add dash/wall/jump scripts only after that controller is in place. Do not re-inline coyote/buffer/accel loops in the scene when the script already owns them.

One-Way Platforms (correct recipe)

  1. Author one-way on the platform collider (CollisionShape2D one-way / TileSet physics one-way), not by teleporting the player.
  2. Put platforms and player on explicit collision layers/masks so drop-through can temporarily clear the platform bit (or disable collide-with) while holding down + jump — then restore next physics frames.
  3. Keep drop-through on the physics tick; never bypass move_and_slide with position nudges.
  4. For tile one-ways, align TileSet physics layers with CharacterBody masks — see godot-tilemap-mastery + godot-2d-physics.

Expert Character Architectures

1. Wall Cling (Variable Friction)

Monitor is_on_wall() while falling; scale velocity.y by a friction factor (optionally from tile custom data) instead of a binary wall-slide bool. Prefer wall_slide_jump_refined.gd over a bespoke cling fork.

2. Animation-Driven Movement (Root Motion)

Pull AnimationTree.get_root_motion_position(), convert to 2D, assign velocity = motion / delta, then move_and_slide(). Keeps feet locked to authored clips; pair with godot-2d-animation.

3. Game-Feel Profiler (Jump Arcs)

Debug-draw historical positions + current velocity in _draw() to visualize apex, coyote, and buffer windows while tuning exports on expert_physics_2d.gdgame_feel_profiler.gd.

MANDATORY for top-down/tank recipes, moving platforms, slide-collision response, and gotcha tables: movement-recipes.md. Do NOT Load when expert_physics_2d.gd already covers your platformer scope.

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing work to a peer domain — do not preload the whole lattice.

Official Documentation

  • Using CharacterBody2D — Canonical move_and_slide / floor-wall-ceiling contracts; do not set position for gameplay motion.
  • CharacterBody2D — API for velocity, snap, is_on_floor / wall / ceiling, and slide-collision accessors.
  • Physics introduction — Why CharacterBody vs RigidBody/StaticBody, and how layers/masks gate every contact.
  • Collision shapes (2D) — Capsule/box sizing and why scaled CollisionShape2D nodes corrupt normals and floor detect.
  • 2D movement — Input axes into velocity for top-down and platformer starters before juice systems.
  • Kinematic character (2D) — Classic slide/collision loop patterns that still inform custom stair and slope handling.
  • Troubleshooting physics issues — One-way platforms, tunneling, and jitter diagnoses that show up in CharacterBody feel bugs.
  • Ray-casting — Direct-space rays for stair snaps, ledge checks, and ground probes beyond is_on_floor().
  • KinematicCollision2D — Per-slide normals/remainders from get_slide_collision for wall jumps and ceiling bonks.
  • Physics interpolation introduction — Smooth visuals at high refresh while keeping jump/coyote logic on the physics tick.
  • InputEvent — Action just-pressed timing that jump buffers and coyote windows depend on.

Related Skills

Prerequisites
  • godot-project-foundations — Default gravity, physics tick rate, and 2D layer names must be set before coyote/jump feel is tunable.
  • godot-gdscript-mastery — Typed _physics_process, timers, and move_toward discipline underpin every movement script here.
  • godot-2d-physics — Collision layer/mask matrices, one-way shapes, and query hygiene CharacterBody motion sits on.
  • godot-input-handling — Physics-step action sampling so jump buffer / coyote windows stay frame-stable.
Complements
  • godot-raycasting-queries — Stair snaps, wall cling probes, and ledge rays that extend beyond is_on_* helpers.
  • godot-tilemap-mastery — One-way tiles and tile physics layers must match CharacterBody masks for platforms.
  • godot-2d-animation — Drive walk/jump/fall clips from floor/air/dash state without fighting move_and_slide.
  • godot-state-machine-advanced — Dash, wall-slide, and airborne states scale cleaner than giant _physics_process switches.
  • godot-camera-systems — Follow/look-ahead cameras couple tightly to CharacterBody velocity and landing snaps.
  • godot-signal-architecture — Landed/dashed/wall-jumped events need clean ownership so UI/VFX listeners do not spam.
Downstream / consumers
  • godot-genre-platformer — Genre-level platformer feel consumes coyote, buffer, slopes, and one-ways from this skill.
  • godot-genre-metroidvania — Ability-gated movement (wall jump, dash) builds on the controllers defined here.
  • godot-combat-system — Knockback and hitstun apply impulses through the same velocity + slide loop.
  • godot-monte-carlo-balancer — Coyote frames, jump height, dash cooldown, and air accel are balance knobs — simulate them instead of guessing.
Master
  • godot-master — Library router and mirrored entry point for CharacterBody2D alongside sibling domains.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Godot Characterbody 2d AI skill do?

Expert patterns for CharacterBody2D including platformer movement (coyote time, jump buffering, variable jump height), top-down movement (8-way, tank controls), collision handling, one-way platforms, and state machines. Use for player characters, NPCs, or enemies. Trigger keywords: CharacterBody2D, move_and_slide, is_on_floor, coyote_time, jump_buffer, velocity, get_slide_collision, one_way_platforms, state_machine.

Why use Godot Characterbody 2d on TypingMind?

Because you install it once and use it with any model. Godot Characterbody 2d is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Godot Characterbody 2d in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/thedivergentai/GD-Agentic-Skills/tree/main/skills/godot-characterbody-2d. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Godot Characterbody 2d?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Godot Characterbody 2d?

As many as you like. As long as a model supports skills, you can use Godot Characterbody 2d with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Godot Characterbody 2d AI skill free?

Yes. It is published on GitHub by thedivergentai under the LGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇