Godot Physics
/godot-physics
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).
- 许可证
- Apache-2.0
- 出品
- GameSkill 出品
所属合集
Awesome Gamedev Agent Skills
77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.
我们测过
在 Godot 4.7.2 上通过 30/30 项检查(2026-10-30):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告这个 skill 做什么
什么时候触发
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).6+. …
GameSkill 测过的版本
GameSkill 调优版:skill 文件取自提交 19d93f97c9c1,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。
协议:基于 gamedev-skills/awesome-gamedev-agent-skills(作者 gamedev-skills),协议 Apache-2.0。ZIP 保留协议文件(LICENSE, NOTICE),CHANGES.md 列出了 GameSkill 加的所有文件。

自检清单
- 层是“我是什么”,遮罩是“我找什么”,A 要发现 B,B 的层必须在 A 的遮罩里 / Layer = what I am, mask = what I look for
- 不要直接改 RigidBody 的 position,用冲量、力或 linear_velocity / Never set position on a RigidBody; use impulses, forces or linear_velocity
- Area 要检测别人得开 monitoring,要被别人检测得开 monitorable / Area needs monitoring to detect and monitorable to be detected
- 射线在 _physics_process 里读,移动后同一帧要 force_raycast_update() / Read rays in _physics_process; call force_raycast_update() after moving
- intersect_ray 排除自身要传 RID 数组:query.exclude = [self.get_rid()] / Exclude self with an Array[RID], not nodes
中文指南
这个 skill 做什么
这个 skill 讲 Godot 4.7 里 2D 和 3D 的物理体和检测:RigidBody、StaticBody、Area、CharacterBody 怎么选,碰撞层和遮罩怎么配,接触和重叠信号怎么接,射线怎么打(RayCast 节点和直接空间查询)。3D 项目还要先确认跑的是 Jolt Physics 还是 GodotPhysics3D。
什么时候用
- 配碰撞层和遮罩,搞不清谁该撞谁
- 用 Area2D/Area3D 做触发区或受击框
- 给 RigidBody 加力或冲量,或者打射线做视线、地面检测
怎么装
下载本页的 ZIP,把 godot-physics/ 整个文件夹放进 agent 的 skills 文件夹:Claude Code 用 .claude/skills/,Codex、Gemini CLI、OpenCode 用 .agents/skills/,Cursor 用 .cursor/skills/,Copilot 用 .github/skills/,Windsurf 用 .windsurf/skills/,然后重启 agent。也可以直接对 agent 说:Install the skill from https://gameskill.dev/skills/godot-physics/install.md
最小示例
gameskill/examples/ 里是一个 2D 小场景:main.gd 和 main.tscn 放玩家、地面、墙和道具,physics_world.gd 管物理设置,tests/run_tests.gd 是检查,tests/screenshot.gd 出截图。
我们怎么测的
总分 30/30。在 Godot 4.7.2 无头模式下跑 18 项检查:玩家在 layer 1、遮罩扫世界层和原始层;墙在墙层且不扫玩家;道具带碰撞形状,会下落并落地;加冲量后速度改变;玩家站在地面上;射线打到地面且碰撞体是地面,遮罩能过滤掉不该打的东西;点查询能打到墙;Area 的 body_entered 会触发且 monitoring 开着;道具开了 CCD;射线排除自身。审查时去掉了初稿给静态地面和墙设的检测遮罩(静态体不需要检测别人),并修了射线排除自身的写法。结果在 gameskill/test-report.json。
和站内其他 skill 的区别
GodotPrompter 的 kit 里包含 physics-system,范围更宽;站内的 physics-tuning 是引擎无关的手感调参。这个 skill 只讲 Godot 的物理体类型、层和遮罩、以及射线和重叠查询。
搭配
physics-tuning:调手感,时间步、质量、抖动godot-2d-movement:CharacterBody2D 的 move_and_slide 控制器godot-prompter:它的 kit 里带 physics-system,可对照
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/godot-physics/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/godot-physics.zip -o /tmp/gameskill-godot-physics.zip
unzip -oq /tmp/gameskill-godot-physics.zip -d .claude/skills
rm /tmp/gameskill-godot-physics.zip包含内容
- Worked steps: Collision layers vs masks; Area2D as a trigger / hurtbox; Applying force and impulse to a RigidBody3D; Raycast two ways
- A pitfalls section with the mistakes to avoid
- Bundled 1 reference doc the agent reads when needed
- Written for Godot 4.7
适合
- Configuring collision layers/masks, detecting overlaps with Area2D/Area3D, applying forces to a RigidBody
- 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+
试试这条提示词
Set up collision layers, an Area2D hurtbox and a raycast for line of sight.关于这个 Skill
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+.
From the godot-physics SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.
What's inside
- Collision layers vs masks (set from code)
- Area2D as a trigger / hurtbox
- Applying force and impulse to a RigidBody3D
- Raycast two ways
- Jolt Physics (3D) differences
环境要求
- Godot 4.7
常见问题
肉鸽构筑白标起步工程(Godot 4 + Web + 平衡表)
告别空工程从零搭架子!开箱即玩的白标肉鸽构筑商业起步模板(Godot 4 完整工程 + Web 可玩版):含开局三槽赐福、无交叉 DAG 地图、扇形出牌、Boss 半血锁血、篝火/商店删牌、32 位校验防坏档 SaveStore、中英切换、30 牌/18 遗物/15 怪平衡表与 1,000 局 HTML 压测工具。
- 完整 Godot 4.3+ 工程(打开即 F5 运行,内置防坏档原子 SaveStore + 中英实时切换 LocService)
- 零构建 Web HTML5 可玩起步版(扇形手牌、2 帧受击闪白、震屏与 Boss 半血锁血全跑通)
基于 gamedev-skills/awesome-gamedev-agent-skills (作者 gamedev-skills,协议 Apache-2.0)。ZIP 里保留原作者的 LICENSE 和 NOTICE,ATTRIBUTION.md 和 CHANGES.md 写明来源提交和 GameSkill 加的内容。
搭配使用
作者标注的相关 Skills,或更适合相邻任务的 Skills。
Godot 2D Movement
2D character movement in Godot 4.7 with CharacterBody2D: platformer jumping, top-down motion, slopes and reading collisions.
Godot TileMap
Tile-based 2D levels in Godot 4.7 with TileMapLayer: collision and navigation on tiles, terrain autotiling and editing cells from code.
Game Physics Tuning
Stable, good-feeling physics: fixed timestep with interpolation, mass and drag, CCD against tunneling, jitter fixes and collision layers.
Godot 3D Essentials
Set up 3D scenes in Godot 4.7: transforms, cameras, lights, WorldEnvironment, materials and GridMap levels.
Awesome Gamedev Agent Skills 中的更多 Skills
查看全部 44 个2D Platformer
Build a 2D platformer: run/jump control with coyote time, jump buffering, and variable jump height, plus tiled levels and hazards.
Behavior Trees & Utility AI
Build a behavior-tree runtime and a Utility AI system with response curves, plus hybrid agents where the behavior tree drives utility scoring.
Bevy ECS
Structure a Bevy app around ECS: plugins, components and resources, systems with Query and Commands, system ordering and Time.
Card Game
Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.
相似 skills
Claude Code Game Studios
Turns Claude Code into a full game studio: 49 agents and 72 workflow skills arranged like a real studio hierarchy.
Godogen
Autonomous game development with Claude Code and Codex. Publishes a ready game repo for Godot, Bevy, Babylon.js or three.js.
pixelfx
244 pixel-art effects written as code (fire, explosions, magic, weather, UI, pickups, critters) plus a draft, render, look, refine loop for making new ones; every effect exports a sprite sheet with Aseprite-style JSON for Godot, Unity, Phaser or any engine.
Godot AI
Production-grade MCP server and editor plugin for Godot 4.7+: 46 tools and 120+ operations for scenes, nodes, scripts, UI and more.