godot-physics
Agent skill fromgamedev-skills/awesome-gamedev-agent-skills
Use Godot 4.7 physics bodies and detection in 2D and 3D: RigidBody, StaticBody, Area, and CharacterBody; collision layers vs masks; contact/overlap signals; and raycasts (RayCast nodes and direct space-state queries). Use when configuring collision layers/masks, detecting overlaps with Area2D/Area3D, applying forces to a RigidBody, or casting rays in a Godot project (.tscn with physics bodies), including 3D projects running Jolt Physics, the default 3D engine for projects created in 4.6+.
How to install godot-physics
npx skills add gamedev-skills/awesome-gamedev-agent-skills# or add only this skill to Claude Code: copy the folder
skills/godot/godot-physics/
# into
~/.claude/skills/godot-physics/ (all projects)
.claude/skills/godot-physics/ (one project)
1# Godot Physics (4.x, 2D + 3D)23Pick the right physics body, wire up collision layers/masks, detect overlaps, and cast4rays. Concepts apply to both 2D and 3D (swap the `2D`/`3D` suffix). Targets5**Godot 4.7**. In 3D, projects created with Godot 4.6 or later run **Jolt Physics** by6default; older projects keep **GodotPhysics3D** unless someone switched them. 2D always7uses Godot's own 2D engine.89## When to use1011- Use when choosing between body types, setting collision layers/masks so the right12 things collide, detecting overlaps (triggers, hurtboxes) with `Area`, applying13 forces/impulses to a `RigidBody`, or casting rays for line-of-sight/ground checks.1415**When *not* to use:** kinematic character controllers (`move_and_slide`) →16`godot-2d-movement`; tile collision setup → `godot-tilemap`; tuning the *feel* of physics17(timestep, mass, jitter) → `physics-tuning`.1819## Core workflow20211. **For 3D, check which engine runs** before debugging behavior: Project Settings >22 Physics > 3D > Physics Engine (`[physics]` `3d/physics_engine="Jolt Physics"` in23 `project.godot`). Projects created in 4.6+ get Jolt written there by default; with no24 such line (`DEFAULT`) the engine is GodotPhysics3D. The API is the same, but joints,25 ray-cast face indices, kinematic contacts, and collision margins behave differently26 (see Pitfalls).272. **Choose the body type:**28 - `StaticBody` — never moves (floors, walls). Collides, no simulation.29…
Excerpt shown under the repository's Apache-2.0 license.
