[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79MCS0JZ1N1PV8R3REWCBWR":3,"skill-same:01M79MCS0JZ1N1PV8R3REWCBWR":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M79MCS0JZ1N1PV8R3REWCBWR","godot-physics",null,"Use Godot 4.x physics bodies and detection in 2D and 3D: RigidBody, StaticBody, Area, and CharacterBody; collision layers vs masks; contact\u002Foverlap signals; and raycasts (RayCast nodes and direct space-state queries). Use when configuring collision layers\u002Fmasks, detecting overlaps with Area2D\u002FArea3D, applying forces to a RigidBody, or casting rays in a Godot project (.tscn with physics bodies).","mistervaibhav\u002Fskills","mistervaibhav","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F41189028?v=4","01M79KACH05EG9FMM6DQVHAVK9","Vaibhav Singh","01M79KACJB3431Y8CFJQ02MTTM",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Fgodot-physics\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: godot-physics\ndescription: >\n  Use Godot 4.x physics bodies and detection in 2D and 3D: RigidBody, StaticBody,\n  Area, and CharacterBody; collision layers vs masks; contact\u002Foverlap signals; and\n  raycasts (RayCast nodes and direct space-state queries). Use when configuring\n  collision layers\u002Fmasks, detecting overlaps with Area2D\u002FArea3D, applying forces to a\n  RigidBody, or casting rays in a Godot project (.tscn with physics bodies).\nlicense: Apache-2.0\ncompatibility: Godot 4.3+\nmetadata:\n  engine: godot\n  category: godot\n  difficulty: intermediate\n---\n\n# Godot Physics (4.x, 2D + 3D)\n\nPick the right physics body, wire up collision layers\u002Fmasks, detect overlaps, and cast\nrays. Concepts apply to both 2D and 3D (swap the `2D`\u002F`3D` suffix). Targets\n**Godot 4.3+**.\n\n## When to use\n\n- Use when choosing between body types, setting collision layers\u002Fmasks so the right\n  things collide, detecting overlaps (triggers, hurtboxes) with `Area`, applying\n  forces\u002Fimpulses to a `RigidBody`, or casting rays for line-of-sight\u002Fground checks.\n\n**When *not* to use:** kinematic character controllers (`move_and_slide`) →\n`godot-2d-movement`; tile collision setup → `godot-tilemap`; tuning the *feel* of physics\n(timestep, mass, jitter) → `physics-tuning`.\n\n## Core workflow\n\n1. **Choose the body type:**\n   - `StaticBody` — never moves (floors, walls). Collides, no simulation.\n   - `RigidBody` — fully simulated (gravity, forces, bouncing). Don't set its\n     `position` directly; apply forces\u002Fimpulses or set `linear_velocity`.\n   - `CharacterBody` — script-driven kinematic (see `godot-2d-movement`).\n   - `Area` — detects overlaps and can apply gravity\u002Fdamping; no solid collision.\n   Every body needs a `CollisionShape` (or `CollisionPolygon`) child.\n2. **Configure layers and masks.** A body is *on* its **layers** and *scans for* its\n   **masks**. Two bodies interact only if one's layer is in the other's mask. Name layers\n   in Project Settings > Layer Names for clarity.\n3. **Detect overlaps** with `Area` signals (`body_entered`, `area_entered`).\n4. **Drive RigidBodies with forces\u002Fimpulses**, or override `_integrate_forces` for full\n   control.\n5. **Cast rays** with a `RayCast2D\u002F3D` node (polled each frame) or a one-shot space-state\n   query from code.\n\n## Patterns\n\n### 1. Collision layers vs masks (set from code)\n\n```gdscript\n# Player is on layer 1, scans layers 2 (walls) and 3 (enemies).\nfunc _ready() -> void:\n    set_collision_layer_value(1, true)    # I am on layer 1\n    set_collision_mask_value(2, true)     # I collide with things on layer 2\n    set_collision_mask_value(3, true)     # ...and layer 3\n    # Bit-field forms also exist: collision_layer = 1; collision_mask = 0b110\n```\n\n### 2. Area2D as a trigger \u002F hurtbox\n\n```gdscript\nextends Area2D                            # e.g. a damage zone\n\nfunc _ready() -> void:\n    body_entered.connect(_on_body_entered)\n    area_entered.connect(_on_area_entered)\n\nfunc _on_body_entered(body: Node2D) -> void:\n    if body.has_method(\"take_damage\"):\n        body.take_damage(10)\n\nfunc _on_area_entered(area: Area2D) -> void:\n    print(\"Overlapped area: \", area.name)\n```\n\n### 3. Applying force and impulse to a RigidBody3D\n\n```gdscript\nextends RigidBody3D\n\nfunc push(direction: Vector3) -> void:\n    apply_central_impulse(direction * 8.0)     # instantaneous velocity change\n\nfunc _physics_process(_delta: float) -> void:\n    apply_central_force(Vector3.FORWARD * 4.0) # continuous force (per tick)\n    # Never set `position` on a RigidBody to move it; use forces\u002Fimpulses or\n    # set linear_velocity. Use freeze=true if you must hold it in place.\n```\n\n### 4. Raycast two ways\n\n```gdscript\n# A) RayCast2D node: enable it, then poll after physics has updated.\n@onready var ray: RayCast2D = $RayCast2D    # set target_position in the editor\n\nfunc _physics_process(_delta: float) -> void:\n    if ray.is_colliding():\n        var hit := ray.get_collider()\n        var point := ray.get_collision_point()\n\n# B) One-shot query from code (no node needed).\nfunc ground_under(global_from: Vector2) -> Dictionary:\n    var space := get_world_2d().direct_space_state\n    var query := PhysicsRayQueryParameters2D.create(global_from, global_from + Vector2(0, 64))\n    query.collision_mask = 1                 # only layer 1\n    return space.intersect_ray(query)        # {} if nothing hit, else collider\u002Fposition\u002Fnormal\n```\n\n## Pitfalls\n\n- **Layer vs mask confusion** is the #1 bug. Layer = \"what I am\"; mask = \"what I look\n  for\". For A to detect B, B's layer must be in A's mask. Detection can be one-directional.\n- **Moving a RigidBody by `position`** fights the solver and causes tunneling\u002Fjitter.\n  Use impulses\u002Fforces, set `linear_velocity`, or `freeze` it. To teleport, set position\n  and zero the velocities inside `_integrate_forces`.\n- **`Area` doesn't fire** when neither monitoring nor monitorable is set, or layers\u002Fmasks\n  don't overlap. `monitoring` must be on for the Area to detect; `monitorable` lets others\n  detect it.\n- **RayCast2D\u002F3D read stale or no data** if `enabled` is false, or if you read it before\n  physics updated — read in `_physics_process`, and call `force_raycast_update()` after\n  moving it within the same tick.\n- **Forgetting a `CollisionShape`** (or leaving it empty) means the body never collides.\n- **Fast objects tunnel** through thin walls; enable **continuous CD** on the RigidBody\n  (`continuous_cd`) or use a raycast-based check.\n- **`intersect_ray` excludes its own body?** Pass `query.exclude = [self.get_rid()]` (an\n  `Array[RID]`, not an array of nodes) to skip self-hits.\n\n## References\n\n- For `_integrate_forces`, joints, one-way collision, `PhysicsServer` direct access,\n  shape queries (`intersect_shape`), and 3D `move_and_collide`, read\n  `references\u002Fbodies-and-queries.md`.\n\n## Related skills\n\n- `godot-2d-movement` — kinematic `CharacterBody2D` controllers.\n- `godot-tilemap` — tile collision shapes and their layers.\n- `physics-tuning` — engine-agnostic feel: timestep, mass, drag, CCD.\n- `godot-3d-essentials` — 3D scene setup these bodies live in.\n","# Godot Physics (4.x, 2D + 3D)\n\nPick the right physics body, wire up collision layers\u002Fmasks, detect overlaps, and cast\nrays. Concepts apply to both 2D and 3D (swap the `2D`\u002F`3D` suffix). Targets\n**Godot 4.3+**.\n\n## When to use\n\n- Use when choosing between body types, setting collision layers\u002Fmasks so the right\n  things collide, detecting overlaps (triggers, hurtboxes) with `Area`, applying\n  forces\u002Fimpulses to a `RigidBody`, or casting rays for line-of-sight\u002Fground checks.\n\n**When *not* to use:** kinematic character controllers (`move_and_slide`) →\n`godot-2d-movement`; tile collision setup → `godot-tilemap`; tuning the *feel* of physics\n(timestep, mass, jitter) → `physics-tuning`.\n\n## Core workflow\n\n1. **Choose the body type:**\n   - `StaticBody` — never moves (floors, walls). Collides, no simulation.\n   - `RigidBody` — fully simulated (gravity, forces, bouncing). Don't set its\n     `position` directly; apply forces\u002Fimpulses or set `linear_velocity`.\n   - `CharacterBody` — script-driven kinematic (see `godot-2d-movement`).\n   - `Area` — detects overlaps and can apply gravity\u002Fdamping; no solid collision.\n   Every body needs a `CollisionShape` (or `CollisionPolygon`) child.\n2. **Configure layers and masks.** A body is *on* its **layers** and *scans for* its\n   **masks**. Two bodies interact only if one's layer is in the other's mask. Name layers\n   in Project Settings > Layer Names for clarity.\n3. **Detect overlaps** with `Area` signals (`body_entered`, `area_entered`).\n4. **Drive RigidBodies with forces\u002Fimpulses**, or override `_integrate_forces` for full\n   control.\n5. **Cast rays** with a `RayCast2D\u002F3D` node (polled each frame) or a one-shot space-state\n   query from code.\n\n## Patterns\n\n### 1. Collision layers vs masks (set from code)\n\n```gdscript\n# Player is on layer 1, scans layers 2 (walls) and 3 (enemies).\nfunc _ready() -> void:\n    set_collision_layer_value(1, true)    # I am on layer 1\n    set_collision_mask_value(2, true)     # I collide with things on layer 2\n    set_collision_mask_value(3, true)     # ...and layer 3\n    # Bit-field forms also exist: collision_layer = 1; collision_mask = 0b110\n```\n\n### 2. Area2D as a trigger \u002F hurtbox\n\n```gdscript\nextends Area2D                            # e.g. a damage zone\n\nfunc _ready() -> void:\n    body_entered.connect(_on_body_entered)\n    area_entered.connect(_on_area_entered)\n\nfunc _on_body_entered(body: Node2D) -> void:\n    if body.has_method(\"take_damage\"):\n        body.take_damage(10)\n\nfunc _on_area_entered(area: Area2D) -> void:\n    print(\"Overlapped area: \", area.name)\n```\n\n### 3. Applying force and impulse to a RigidBody3D\n\n```gdscript\nextends RigidBody3D\n\nfunc push(direction: Vector3) -> void:\n    apply_central_impulse(direction * 8.0)     # instantaneous velocity change\n\nfunc _physics_process(_delta: float) -> void:\n    apply_central_force(Vector3.FORWARD * 4.0) # continuous force (per tick)\n    # Never set `position` on a RigidBody to move it; use forces\u002Fimpulses or\n    # set linear_velocity. Use freeze=true if you must hold it in place.\n```\n\n### 4. Raycast two ways\n\n```gdscript\n# A) RayCast2D node: enable it, then poll after physics has updated.\n@onready var ray: RayCast2D = $RayCast2D    # set target_position in the editor\n\nfunc _physics_process(_delta: float) -> void:\n    if ray.is_colliding():\n        var hit := ray.get_collider()\n        var point := ray.get_collision_point()\n\n# B) One-shot query from code (no node needed).\nfunc ground_under(global_from: Vector2) -> Dictionary:\n    var space := get_world_2d().direct_space_state\n    var query := PhysicsRayQueryParameters2D.create(global_from, global_from + Vector2(0, 64))\n    query.collision_mask = 1                 # only layer 1\n    return space.intersect_ray(query)        # {} if nothing hit, else collider\u002Fposition\u002Fnormal\n```\n\n## Pitfalls\n\n- **Layer vs mask confusion** is the #1 bug. Layer = \"what I am\"; mask = \"what I look\n  for\". For A to detect B, B's layer must be in A's mask. Detection can be one-directional.\n- **Moving a RigidBody by `position`** fights the solver and causes tunneling\u002Fjitter.\n  Use impulses\u002Fforces, set `linear_velocity`, or `freeze` it. To teleport, set position\n  and zero the velocities inside `_integrate_forces`.\n- **`Area` doesn't fire** when neither monitoring nor monitorable is set, or layers\u002Fmasks\n  don't overlap. `monitoring` must be on for the Area to detect; `monitorable` lets others\n  detect it.\n- **RayCast2D\u002F3D read stale or no data** if `enabled` is false, or if you read it before\n  physics updated — read in `_physics_process`, and call `force_raycast_update()` after\n  moving it within the same tick.\n- **Forgetting a `CollisionShape`** (or leaving it empty) means the body never collides.\n- **Fast objects tunnel** through thin walls; enable **continuous CD** on the RigidBody\n  (`continuous_cd`) or use a raycast-based check.\n- **`intersect_ray` excludes its own body?** Pass `query.exclude = [self.get_rid()]` (an\n  `Array[RID]`, not an array of nodes) to skip self-hits.\n\n## References\n\n- For `_integrate_forces`, joints, one-way collision, `PhysicsServer` direct access,\n  shape queries (`intersect_shape`), and 3D `move_and_collide`, read\n  `references\u002Fbodies-and-queries.md`.\n\n## Related skills\n\n- `godot-2d-movement` — kinematic `CharacterBody2D` controllers.\n- `godot-tilemap` — tile collision shapes and their layers.\n- `physics-tuning` — engine-agnostic feel: timestep, mass, drag, CCD.\n- `godot-3d-essentials` — 3D scene setup these bodies live in.\n",{"name":5,"license":15,"metadata":24,"description":27,"compatibility":28},{"engine":25,"category":25,"difficulty":26},"godot","intermediate","Use Godot 4.x physics bodies and detection in 2D and 3D: RigidBody, StaticBody, Area, and CharacterBody; collision layers vs masks; contact\u002Foverlap signals; and raycasts (RayCast nodes and direct space-state queries). Use when configuring collision layers\u002Fmasks, detecting overlaps with Area2D\u002FArea3D, applying forces to a RigidBody, or casting rays in a Godot project (.tscn with physics bodies).\n","Godot 4.3+","main","6d4e3296d58b2720c5b1026197cd069b1dde4789","https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills","https:\u002F\u002Fgithub.com\u002Fmistervaibhav","Software Engineer","2026-07-24 17:16:42",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add mistervaibhav\u002Fskills --skill godot-physics",{"tool":41,"command":42},"bunx","bunx skills add mistervaibhav\u002Fskills --skill godot-physics",{"tool":44,"command":45},"pnpm","pnpm dlx skills add mistervaibhav\u002Fskills --skill godot-physics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Fgodot-physics\u002FSKILL.md",true,[49],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fbodies-and-queries.md","REFERENCE","参考文档",3964,"https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Fgodot-physics\u002Freferences\u002Fbodies-and-queries.md",[56,64,72,80,87,94],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":60,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79NZDV5781GA6SJMN1QPXB4","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":68,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M79NZ8SEVWT4WYD49BV980YW","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", or \"type hierarchy\". Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","MIT","https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":68,"licenseFileUrl":76,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M79NYVQS5NYHH36NXF2AHP8B","web-haptics","Add haptic feedback to web apps using the web-haptics library. Use when building mobile-facing UIs that need tactile feedback on buttons, toggles, forms, pickers, and other interactive elements.","https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Fweb-haptics\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Fweb-haptics\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M79NY8AMC62DDRSH21WKXJVE","visual-novel","Build a visual novel: a branching script, character and background display, a text box with choices, save\u002Fload, backlog, and skip\u002Fauto. Use for a VN, dating sim, or branching story game.","https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Fvisual-novel\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":68,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M79NWFM5R9QC9Y2AT40EHF44","ux-heuristics","Evaluate and improve interface usability using heuristic analysis. Use when the user mentions \"usability audit\", \"UX review\", \"users are confused\", \"heuristic evaluation\", \"form usability\", or \"navigation problems\". Covers Nielsen's 10 heuristics, severity ratings, and information architecture. For visual design fixes, see refactoring-ui. For conversion-focused audits, see cro-methodology.","https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Fux-heuristics\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M79NVSG7AB3MSFT8Y6EEHG1B","unreal-packaging","Package and ship an Unreal Engine 5 project: the Platforms menu Package Project flow, build configurations (Development vs Shipping), cooking content, packaging settings and the Game Default Map, and command-line builds with RunUAT BuildCookRun. Use when packaging a build, making a shipping build, cooking content, configuring packaging settings, or when the user mentions package Unreal, cook content, shipping build, or BuildCookRun.","https:\u002F\u002Fgithub.com\u002Fmistervaibhav\u002Fskills\u002Fblob\u002Fmain\u002Funreal-packaging\u002FSKILL.md",[],[]]