physics-arcade

Implements Arcade Physics in Phaser 4 including collisions, gravity, and collision categories.

465|41|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/autonomous-ai/openharness --skill physics-arcade-autonomous-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: physics-arcade
Source: https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/physics-arcade
Command: npx skills add https://github.com/autonomous-ai/openharness --skill physics-arcade-autonomous-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up 2D physics in Phaser 4 games involves many interacting pieces—world configuration, dynamic and static bodies, colliders, and collision filtering—and getting any of them wrong leads to subtle bugs like static platforms that stop colliding after a scale change or events that never fire. ## Core Features & Use Cases - Physics Setup and Bodies: Enable Arcade Physics in GameConfig, create dynamic sprites and static groups, and configure velocity, acceleration, gravity, drag, and bounce per body. - Collision Handling: Register persistent colliders and overlaps with callbacks, use one-shot collision checks, and filter interactions with collision categories and masks. - Use Case: Build a platformer where the player collides with static platforms, overlaps coins to collect them, bounces off world bounds, and only collides with specific enemy categories using bitmask filtering. ## Quick Start Set up Arcade Physics in my Phaser 4 game with a player sprite that collides with static platforms and collects coins via overlap detection.

Frequently Asked Questions about physics-arcade

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

FAQPage Schema
How do I enable Arcade Physics in a Phaser 4 game?

Add a physics block to your GameConfig with default set to 'arcade' and optional arcade settings like gravity and debug. Then create physics objects in a Scene using this.physics.add.sprite() or this.physics.add.staticGroup().

What is the difference between collide and overlap in Phaser Arcade Physics?

Collide performs separation, pushing bodies apart so they cannot pass through each other. Overlap only detects intersection without moving anything, making it the right choice for triggers like pickups and sensors.

Why does my static body stop colliding after I change its scale?

Static bodies do not auto-sync with their Game Object's transform. After changing position, scale, or origin, call body.reset() or gameObject.refreshBody() to update the static body's bounds.

How do collision categories work in Phaser Arcade Physics?

Collision categories use bitmask values to filter which bodies interact. Assign a category with setCollisionCategory, define targets with setCollidesWith, and generate new categories via this.physics.nextCategory(), with a maximum of 32 categories.

Why are Phaser physics events like collide or worldbounds not firing?

World events require per-body opt-in. Set body.onCollide, body.onOverlap, or body.onWorldBounds to true on the relevant body, otherwise the corresponding world events will never be emitted.