physics-arcade

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

Updated Sep 20, 2026
One-click install
npx skills add https://github.com/AmirOssanloo/helix-game --skill physics-arcade-amirossanloo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: physics-arcade
Source: https://github.com/AmirOssanloo/helix-game/tree/main/.claude/skills/physics-arcade
Command: npx skills add https://github.com/AmirOssanloo/helix-game --skill physics-arcade-amirossanloo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up 2D physics in Phaser 4 involves many interacting pieces—world configuration, dynamic and static bodies, colliders, groups, and collision filtering—and getting any of them wrong leads to subtle bugs like static bodies not syncing or events never firing. This Skill provides a complete, accurate reference for the Arcade Physics system so you can implement movement, gravity, and collisions correctly the first time. ## Core Features & Use Cases - Physics Setup & Bodies: Enable Arcade Physics in GameConfig, create dynamic and static sprites/images/groups, and configure velocity, acceleration, drag, bounce, and per-body gravity. - Collision Handling: Register persistent colliders and overlaps with callbacks and process filters, manage world bounds, and use bitmask collision categories to control which bodies interact. - Use Case: Building a platformer where the player runs and jumps on static platforms, collects coins via overlap triggers, and enemy bullets only collide with the player—using collision categories to filter interactions cleanly. ## 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 responds to keyboard input.

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 Phaser 4?▼

Enable Arcade Physics by adding a physics block to your GameConfig with default set to 'arcade' and optional arcade settings like gravity and debug. Then create physics-enabled 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.

How do collision categories work in Phaser 4 Arcade Physics?▼

Collision categories use bitmask values to filter which bodies interact. Call this.physics.nextCategory() to get a category, assign it with setCollisionCategory, then define allowed targets with setCollidesWith. A maximum of 32 categories is supported.

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 of a static sprite or image, you must call body.reset() or gameObject.refreshBody() to update the physics body.

Why are Phaser physics world 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.

When should I disable the RTree spatial index in Arcade Physics?▼

The RTree spatial index is enabled by default via useTree and accelerates lookups for dynamic bodies. It becomes expensive to rebuild with very large body counts, so set useTree to false when simulating 5000 or more dynamic bodies.