godot-physics

Configures collision layers, physics bodies, and Area2D detection patterns in Godot.

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/zerox-core/AI_Game --skill godot-physics-zerox-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: godot-physics
Source: https://github.com/zerox-core/AI_Game/tree/main/.claude/skills/godot-physics
Command: npx skills add https://github.com/zerox-core/AI_Game --skill godot-physics-zerox-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up collision layers, masks, and physics bodies in Godot is error-prone because layer bit values, body types, and signal wiring are easy to confuse, leading to bullets that pass through enemies or triggers that never fire. ## Core Features & Use Cases - Collision Layer Standard: Provides an 8-layer convention mapping player, enemy, projectile, pickup, and trigger objects to specific bits, with a matrix of what detects what. - Physics Body Patterns: Gives ready GDScript templates for CharacterBody2D, RigidBody2D, StaticBody2D, and Area2D, including signal connections for body_entered and area_entered. - Use Case: When a player bullet fails to hit an enemy, use the layer/mask tables and code snippets to verify the bullet's collision_mask includes the enemy's layer bit and fix the setup in minutes. ## Quick Start Ask the AI to set up a player bullet that detects enemy bodies using the godot-physics collision layer standard.

Frequently Asked Questions about godot-physics

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

FAQPage Schema
How do I set up collision layers in Godot?

Assign each object a collision_layer bit for what it is and a collision_mask for what it detects. Layer 1 equals value 1, layer 4 equals value 8, so detecting layers 4 and 6 means setting the mask to 8 | 32, or using set_collision_mask_value(4, true).

How to make a bullet detect enemies in Godot 2D?

Use an Area2D for the bullet, set its collision_layer to the projectile layer and its collision_mask to the enemy body layer bit. Connect the body_entered signal to detect CharacterBody2D enemies, or area_entered for other Area2D hitboxes.

What is the difference between CharacterBody2D and Area2D?

CharacterBody2D handles manual movement with move_and_slide and collision responses like is_on_floor, suited for players and enemies. Area2D only detects overlaps through signals and is used for bullets, pickups, triggers, and hitboxes.

Why is my Area2D not detecting the player in Godot?

The Area2D collision_mask must include the player's collision_layer bit, and the body_entered signal must be connected. Also verify the player uses a physics body type like CharacterBody2D, since body_entered does not fire for other Area2D nodes.

How do I make one-way platforms in Godot?

Enable one_way_collision on the CollisionShape2D of a StaticBody2D platform. The player then falls through from below but lands on top, which is the standard pattern for platformer levels.