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…

Apache-2.0Auto-check passedGame Development

Install Godot Physics

skills CLI
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-physics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gamedev-skills/awesome-gamedev-agent-skills godot-physics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gamedev-skills/awesome-gamedev-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/godot/godot-physics .claude/skills/godot-physics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
godot-physics
GitHub stars
1.4k
Token cost
~2.1k tokens
SKILL.md length
752 words
Files
2 (incl. references)
Skills in repo
53
Repo updated
First seen
Licence
Apache-2.0

At a glance

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…

  • Works in 4 steps: Collision layers vs masks (set from code) → Area2D as a trigger / hurtbox → Applying force and impulse to a… → …
  • Configuring collision layers/masks
  • SKILL.md covers When to use, Core workflow, Patterns and Pitfalls, plus 2 more sections
  • Reaches docs.godotengine.org

What it does

Godot Physics is an agent skill from gamedev-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+.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/bodies-and-queries.md`).

It sits in Game Development, covering Game development. It works with Godot. The repository describes itself as: 74 game-dev skills for AI coding agents — Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox. Portable SKILL.md Agent Skills (the format Anthropic… The licence is Apache-2.0.

When your agent uses it

  • Configuring collision layers/masks
  • Detecting overlaps with Area2D/Area3D
  • Applying forces to a RigidBody
  • Casting rays in a Godot project (.tscn with physics bodies)

Example prompts

  • “/godot-physics”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Collision layers vs masks (set from code)
  2. Area2D as a trigger / hurtbox
  3. Applying force and impulse to a RigidBody3D
  4. Raycast two ways

What it can do on your machine

Read from SKILL.md and the folder at commit 0a70cfc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are gdscript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • docs.godotengine.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Godot Physics loads about 2.1k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 127 tokens; SKILL.md has 752 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~127
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from gamedev-skills/awesome-gamedev-agent-skills at commit 0a70cfc, republished under its Apache-2.0 licence (© gamedev-skills). 752 words, ~2,067 tokens.

Download SKILL.mdSave it as .claude/skills/godot-physics/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
godot-physics
description
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+.

Godot Physics (4.x, 2D + 3D)

Pick the right physics body, wire up collision layers/masks, detect overlaps, and cast rays. Concepts apply to both 2D and 3D (swap the 2D/3D suffix). Targets Godot 4.7. In 3D, projects created with Godot 4.6 or later run Jolt Physics by default; older projects keep GodotPhysics3D unless someone switched them. 2D always uses Godot's own 2D engine.

When to use

  • Use when choosing between body types, setting collision layers/masks so the right things collide, detecting overlaps (triggers, hurtboxes) with Area, applying forces/impulses to a RigidBody, or casting rays for line-of-sight/ground checks.

When not to use: kinematic character controllers (move_and_slide) → godot-2d-movement; tile collision setup → godot-tilemap; tuning the feel of physics (timestep, mass, jitter) → physics-tuning.

Core workflow

  1. For 3D, check which engine runs before debugging behavior: Project Settings > Physics > 3D > Physics Engine ([physics] 3d/physics_engine="Jolt Physics" in project.godot). The API is the same, but joints, ray-cast face indices, kinematic contacts, and collision margins behave differently (see Pitfalls).
  2. Choose the body type:
    • StaticBody — never moves (floors, walls). Collides, no simulation.
    • RigidBody — fully simulated (gravity, forces, bouncing). Don't set its position directly; apply forces/impulses or set linear_velocity.
    • CharacterBody — script-driven kinematic (see godot-2d-movement).
    • Area — detects overlaps and can apply gravity/damping; no solid collision. Every body needs a CollisionShape (or CollisionPolygon) child.
  3. Configure layers and masks. A body is on its layers and scans for its masks. Two bodies interact only if one's layer is in the other's mask. Name layers in Project Settings > Layer Names for clarity.
  4. Detect overlaps with Area signals (body_entered, area_entered).
  5. Drive RigidBodies with forces/impulses, or override _integrate_forces for full control.
  6. Cast rays with a RayCast2D/3D node (polled each frame) or a one-shot space-state query from code.

Patterns

1. Collision layers vs masks (set from code)
gdscript
# Player is on layer 1, scans layers 2 (walls) and 3 (enemies).
func _ready() -> void:
    set_collision_layer_value(1, true)    # I am on layer 1
    set_collision_mask_value(2, true)     # I collide with things on layer 2
    set_collision_mask_value(3, true)     # ...and layer 3
    # Bit-field forms also exist: collision_layer = 1; collision_mask = 0b110
2. Area2D as a trigger / hurtbox
gdscript
extends Area2D                            # e.g. a damage zone

func _ready() -> void:
    body_entered.connect(_on_body_entered)
    area_entered.connect(_on_area_entered)

func _on_body_entered(body: Node2D) -> void:
    if body.has_method("take_damage"):
        body.take_damage(10)

func _on_area_entered(area: Area2D) -> void:
    print("Overlapped area: ", area.name)
3. Applying force and impulse to a RigidBody3D
gdscript
extends RigidBody3D

func push(direction: Vector3) -> void:
    apply_central_impulse(direction * 8.0)     # instantaneous velocity change

func _physics_process(_delta: float) -> void:
    apply_central_force(Vector3.FORWARD * 4.0) # continuous force (per tick)
    # Never set `position` on a RigidBody to move it; use forces/impulses or
    # set linear_velocity. Use freeze=true if you must hold it in place.
4. Raycast two ways
gdscript
# A) RayCast2D node: enable it, then poll after physics has updated.
@onready var ray: RayCast2D = $RayCast2D    # set target_position in the editor

func _physics_process(_delta: float) -> void:
    if ray.is_colliding():
        var hit := ray.get_collider()
        var point := ray.get_collision_point()

# B) One-shot query from code (no node needed).
func ground_under(global_from: Vector2) -> Dictionary:
    var space := get_world_2d().direct_space_state
    var query := PhysicsRayQueryParameters2D.create(global_from, global_from + Vector2(0, 64))
    query.collision_mask = 1                 # only layer 1
    return space.intersect_ray(query)        # {} if nothing hit, else collider/position/normal

Pitfalls

  • Layer vs mask confusion is the #1 bug. Layer = "what I am"; mask = "what I look for". For A to detect B, B's layer must be in A's mask. Detection can be one-directional.
  • Moving a RigidBody by position fights the solver and causes tunneling/jitter. Use impulses/forces, set linear_velocity, or freeze it. To teleport, set position and zero the velocities inside _integrate_forces.
  • Area doesn't fire when neither monitoring nor monitorable is set, or layers/masks don't overlap. monitoring must be on for the Area to detect; monitorable lets others detect it.
  • RayCast2D/3D read stale or no data if enabled is false, or if you read it before physics updated — read in _physics_process, and call force_raycast_update() after moving it within the same tick.
  • Forgetting a CollisionShape (or leaving it empty) means the body never collides.
  • Fast objects tunnel through thin walls; enable continuous CD on the RigidBody (continuous_cd) or use a raycast-based check.
  • intersect_ray excludes its own body? Pass query.exclude = [self.get_rid()] (an Array[RID], not an array of nodes) to skip self-hits.
Show full SKILL.md (271 more words)Show less
Jolt Physics (3D) differences
  • face_index is always -1 in intersect_ray() / RayCast3D results under Jolt. Turn on Project Settings > Physics > Jolt Physics 3D > Queries > Enable Ray Cast Face Index if you need it (it costs roughly 25% more memory for ConcavePolygonShape3D).
  • A joint with only one body gets inverted limits after switching engines. Jolt treats the lone body as node_b with node_a as the world; GodotPhysics3D always treats it as node_a. Assign the body to the slot Jolt expects, or use Physics > Jolt Physics 3D > Joints > World Node for compatibility with an older project.
  • Joint soft-limit properties do nothing under Jolt (e.g. bias/softness/ relaxation on Pin, Hinge and ConeTwist joints; limit softness/restitution/damping on Slider and Generic6DOF joints). Godot warns when they are set to non-default values.
  • A frozen kinematic RigidBody3D reports no contacts with static or kinematic bodies, even with max_contacts_reported > 0. Enable Physics > Jolt Physics 3D > Simulation > Generate All Kinematic Contacts if gameplay depends on those contacts.
  • Shape margin shrinks the shape instead of padding it under Jolt, so sizes stay true but shape queries can return odd normals on small shapes; the effective margin comes from Physics > Jolt Physics 3D > Collisions > Collision Margin Fraction.
  • Area3D now fires body_entered for SoftBody3D under Jolt (GodotPhysics3D never did). Filter soft bodies out with layers/masks if the old behavior is expected.

References

  • For _integrate_forces, joints, one-way collision, PhysicsServer direct access, shape queries (intersect_shape), and 3D move_and_collide, read references/bodies-and-queries.md.
  • Jolt specifics: Godot docs "Using Jolt Physics" (https://docs.godotengine.org/en/stable/tutorials/physics/using_jolt_physics.html).
  • godot-2d-movement — kinematic CharacterBody2D controllers.
  • godot-tilemap — tile collision shapes and their layers.
  • physics-tuning — engine-agnostic feel: timestep, mass, drag, CCD.
  • godot-3d-essentials — 3D scene setup these bodies live in.

© gamedev-skills, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/godot/godot-physics of gamedev-skills/awesome-gamedev-agent-skills.

  • SKILL.md
  • references/bodies-and-queries.md

Open the folder on GitHubat commit 0a70cfc

Compare with similar skills

Godot Physics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Godot Physics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Godot Physics this skillgamedev-skills/awesome-gamedev-agent-skills1.4k—~2.1kAutomated safety check: PassApache-2.0
Godot Gdscript Patterns925236118/AlphaAgent10310 repos~5kAutomated safety check: PassMIT
2D Map and Scene Generator0x0funky/agent-sprite-forge4.4k—~2.9kAutomated safety check: PassMIT
Godot UI Integrationzimo-xiao-zheng/godot-ui-integration285—~1.5kAutomated safety check: PassMIT
Godot Wechat Minigame Adaptergodothub/godot-minigame187—~1.5kAutomated safety check: PassMIT
AI Game Art Pipelineybuild-ai/ai-game-art-pipeline-skill297—~1.1kAutomated safety check: PassMIT

Similar skills

  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 10 repos~5k tokens
    Game DevelopmentAuto-check passed
  • 2D Map and Scene Generator

    0x0funky/agent-sprite-forge

    Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

    4.4k GitHub stars~2.9k tokensUpdated 4 days ago
    Game DevelopmentAuto-check passed
  • Godot UI Integration

    zimo-xiao-zheng/godot-ui-integration

    Build or revise Godot UI from an approved design, separated art, or a visual reference when scene structure, gameplay binding, and runtime visual verification all matter.

    285 GitHub stars~1.5k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Godot Wechat Minigame Adapter

    godothub/godot-minigame

    Apply the bundled self-contained Godot WeChat Mini Game adapter kit to an official Godot checkout.

    187 GitHub stars~1.5k tokensUpdated 25 days ago
    Game DevelopmentAuto-check passed
  • AI Game Art Pipeline

    ybuild-ai/ai-game-art-pipeline-skill

    Provider-neutral open-source skill for planning and producing game-runtime art assets and animation: static props/icons, canonical character sheets, combat sprites, 3D/video motion references…

    297 GitHub stars~1.1k tokensUpdated 3 mo ago
    Game DevelopmentAuto-check passed
  • MCP Driver

    RandallLiuXin/GodotMaker

    Runtime debugging and live project inspection via godot-mcp.

    550 GitHub starsUsed in 1 repo~1.1k tokens
    Game DevelopmentAuto-check passed

More from gamedev-skills/awesome-gamedev-agent-skills

All 53 skills in this repo
  • Create Game Assets

    gamedev-skills/awesome-gamedev-agent-skills

    Plan, generate, source, normalize, and validate cohesive visual game assets.

    1.4k GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Roblox UI

    gamedev-skills/awesome-gamedev-agent-skills

    Build production Roblox interfaces with ScreenGui/PlayerGui lifecycle, responsive UDim2 layouts, safe insets, reusable editable Instances, cross-device input and selection, restrained motion…

    1.4k GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • AI Behavior Trees Utility AI

    gamedev-skills/awesome-gamedev-agent-skills

    Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system (response curves — linear, exponential…

    1.4k GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Bevy Ecs

    gamedev-skills/awesome-gamedev-agent-skills

    Structure a Bevy app around its Entity Component System: build the App with plugins, define Component/Resource types, write systems with Query/Res/Commands, filter and order systems, and use the…

    1.4k GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Card Game

    gamedev-skills/awesome-gamedev-agent-skills

    Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.

    1.4k GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Fps Shooter

    gamedev-skills/awesome-gamedev-agent-skills

    Build a first-person shooter: move+mouse-look controller, hitscan or projectile shooting, weapons, health, and enemy AI.

    1.4k GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Godot Physics

What does Godot Physics do?

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…. Godot Physics is an agent skill from gamedev-skills/awesome-gamedev-agent-skills.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).

When should I use Godot Physics?

Godot Physics fits situations like: configuring collision layers/masks; detecting overlaps with Area2D/Area3D; applying forces to a RigidBody; casting rays in a Godot project (.tscn with physics bodies).

How do I install Godot Physics in Claude Code?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-physics -a claude-code`. Or copy the skill folder (skills/godot/godot-physics in gamedev-skills/awesome-gamedev-agent-skills) into .claude/skills/godot-physics in your project. Claude Code loads it when a task matches its description.

How do I install Godot Physics in Codex?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-physics -a codex`. Or copy the skill folder (skills/godot/godot-physics in gamedev-skills/awesome-gamedev-agent-skills) into .agents/skills/godot-physics in your project. Codex loads it when a task matches its description.

Can I use Godot Physics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill godot-physics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/godot-physics, .gemini/skills/godot-physics, .github/skills/godot-physics and .opencode/skills/godot-physics in your project.

What does Godot Physics need to run?

SKILL.md names no scripts, command-line tools or credentials: Godot Physics is instructions for the agent only.

Does Godot Physics access the network?

SKILL.md names 1 domain. In commands or code: docs.godotengine.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Godot Physics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Godot Physics use?

Godot Physics is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Godot Physics use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 991 tokens, read only when the agent opens those files.

What are the alternatives to Godot Physics?

Skills that share tags, products or a category with Godot Physics: Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars), 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.4k stars), Godot UI Integration (zimo-xiao-zheng/godot-ui-integration, 285 stars) and Godot Wechat Minigame Adapter (godothub/godot-minigame, 187 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Godot Physics?

gamedev-skills (a GitHub organization) maintains it in gamedev-skills/awesome-gamedev-agent-skills, which has 1,389 GitHub stars. The repository holds 53 skills in this directory. The repository was last updated on October 9, 2026.

Source: gamedev-skills/awesome-gamedev-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.