godot-2d-physics

Implement Godot 2D collisions, Area2D triggers, and RayCast2D queries.

Updated Aug 8, 2026
One-click install
npx skills add https://github.com/kimgea/agent-kit --skill godot-2d-physics-kimgea
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: godot-2d-physics
Source: https://github.com/kimgea/agent-kit/tree/main/skills/godot-2d-physics
Command: npx skills add https://github.com/kimgea/agent-kit --skill godot-2d-physics-kimgea

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Godot 2D physics interactions — collisions, triggers, and manual queries — can be error-prone without a structured pattern library. This Skill provides expert, battle-tested patterns to implement robust 2D collisions, Area2D triggers, and raycasting.

Core Features & Use Cases

  • Collision layer/mask management and configuration patterns
  • Area2D trigger handling with reliable event tracking
  • RayCast2D usage for vision and line-of-sight
  • PhysicsDirectSpaceState2D queries for point/shape/ray queries

Quick Start

Review and integrate the included Godot 2D physics patterns by applying the example scripts to implement reliable collisions, triggers, and raycasting in your project.

Frequently Asked Questions about godot-2d-physics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure collision layers and masks for 2D physics in Godot?

Configure Godot 2D collision layers and masks by assigning specific bit values to physics bodies, controlling which objects interact. This Skill provides structured patterns to manage these layer and mask combinations reliably for precise 2D collision handling.

What is the best way to handle Area2D trigger events in Godot without missing collisions?

Handling Area2D trigger events requires reliable tracking of body and area overlaps using entered and exited signals. This Skill offers battle-tested patterns to implement robust Area2D event handling, preventing missed or duplicated trigger detections in 2D games.

How does RayCast2D work for line-of-sight checks in Godot 2D?

RayCast2D works in Godot 2D by projecting a ray from its origin to a target position, detecting physics bodies along its path. This Skill supplies patterns to implement RayCast2D mechanics for precise vision and line-of-sight queries.

When should I use PhysicsDirectSpaceState2D queries instead of Area2D nodes?

Use PhysicsDirectSpaceState2D queries when you need immediate, manual intersection checks for points, shapes, or rays outside the node tree. This Skill details workflows for executing direct space state queries to handle complex 2D physics intersections efficiently.

Can I use these 2D physics patterns for complex game collision queries in Godot?

Yes, these 2D physics patterns apply directly to game developers building 2D games requiring precise collision handling, area-based events, and efficient queries. The provided scripts integrate collision, trigger, and raycasting logic into your Godot project.