player-controller
Installation
SKILL.md
Player Controllers in Godot 4.3+
All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.
Related skills: physics-system for RigidBody, Area, raycasting, and collision shapes, 2d-essentials for TileMaps, parallax, and 2D lighting, 3d-essentials for CharacterBody3D and 3D movement setup, state-machine for movement state management, camera-system for camera follow and shake, component-system for hitbox/hurtbox integration, animation-system for animation driven by movement state, input-handling for InputMap actions and controller support, ai-navigation for enemy movement and pathfinding.
1. Core Concepts
CharacterBody vs RigidBody
| Body Type | Use For | Physics Control | Notes |
|---|---|---|---|
CharacterBody2D/3D |
Player, enemies, NPCs | Manual (full) | You control velocity; move_and_slide() handles collisions |
RigidBody2D/3D |
Projectiles, props, debris | Engine-driven | Physics engine applies forces; harder to control precisely |
RigidBody2D/3D |
Projectiles with bouncing | Engine-driven | Set linear_velocity once; let physics resolve bounces |
CharacterBody2D |
Platformers, top-down, FPS | Manual (full) | Reliable and predictable; best for responsive game feel |