physics-arcade

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

Updated Jun 10, 2026
One-click install
npx skills add https://github.com/mudman1986/quarterless --skill physics-arcade-mudman1986
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: physics-arcade
Source: https://github.com/mudman1986/quarterless/tree/main/.github/skills/physics-arcade
Command: npx skills add https://github.com/mudman1986/quarterless --skill physics-arcade-mudman1986

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up 2D physics in Phaser games involves many interacting pieces—world configuration, body types, colliders, and event opt-ins—and mistakes like forgetting to refresh static bodies or misusing collide versus overlap cause subtle bugs. This Skill provides a complete reference for Arcade Physics in Phaser 4 so physics behavior is implemented correctly the first time. ## Core Features & Use Cases - Physics Setup and Bodies: Enable Arcade Physics in GameConfig, create dynamic and static sprites, images, groups, and standalone bodies with velocity, acceleration, gravity, drag, and bounce. - Collision Handling: Register persistent colliders and overlaps with callbacks and process functions, configure world bounds, and filter interactions with collision categories and masks. - Events and Debugging: Use world events like collide, overlap, and worldbounds with per-body opt-in flags, plus debug rendering and configuration reference tables. - Use Case: While building a Phaser platformer, use this Skill to correctly wire a player sprite against static platforms, collect coins via overlap callbacks, and keep the player inside world bounds. ## Quick Start Ask the AI to set up Arcade Physics in a Phaser 4 scene with a player sprite that collides with static platforms and overlaps collectible coins.

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 game?

Add a physics block with default set to 'arcade' in the GameConfig, optionally specifying gravity and debug options. Then create physics objects in a scene using this.physics.add.sprite, image, staticGroup, or group.

What is the difference between collide and overlap in Phaser?

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 is my static body not updating after moving a sprite in Phaser?

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?

Assign each body a category bitmask via setCollisionCategory and define what it hits with setCollidesWith. Use this.physics.nextCategory() to generate unique category values, 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 before the corresponding world event will be emitted.