physics-arcade

Configure Phaser 4 Arcade Physics for movement, collisions, and world bounds.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/ArtRiv/game-topicos-especiais --skill physics-arcade-artriv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: physics-arcade
Source: https://github.com/ArtRiv/game-topicos-especiais/tree/main/skills/physics-arcade
Command: npx skills add https://github.com/ArtRiv/game-topicos-especiais --skill physics-arcade-artriv

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you set up Phaser 4 Arcade Physics so game objects move, collide, and respond to gravity and world bounds correctly without getting stuck in boilerplate.

Core Features & Use Cases

  • Enable Arcade Physics: Configure Arcade Physics in the Scene/Game config and ensure the physics world steps with the right gravity, bounds, and debug behavior.
  • Control dynamic bodies: Apply velocity, acceleration, drag/damping, bounce, per-body gravity, collision events, and motion limits.
  • Use static bodies and collision logic: Create static platforms via static groups/bodies, refresh static body transforms after scaling/moving, and wire up persistent collide/overlap checks.
  • Filter collisions with categories: Use collision category/mask bitmasks to restrict what collides with what (including group-level filtering).
  • Quick use cases: Platformers (gravity + world bounds + colliders), item pickups (overlap triggers), and enemy hit detection (collide callbacks with optional filtering).

Quick Start

Create a Scene that uses this.physics.add.sprite(...) for your player and this.physics.add.staticGroup() for platforms, then register this.physics.add.collider(...) and control motion in update() with setVelocityX based on input.

Frequently Asked Questions about physics-arcade

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

FAQPage Schema
How do I set up Phaser Arcade Physics for a game Scene?

To set up Phaser Arcade Physics, configure the physics system in your game or Scene config, then use this.physics.add.sprite to create dynamic bodies and this.physics.add.staticGroup for static platforms.

How do I handle collisions and overlaps between sprites in Phaser?

Handle collisions and overlaps in Phaser by registering this.physics.add.collider for persistent collide checks or this.physics.add.overlap for pickup triggers, applying optional collision-category bitmasks to filter interactions.

How do I configure world bounds and gravity for dynamic bodies in Phaser?

Configure world bounds and gravity for dynamic bodies by setting the physics world gravity in the Scene config and opting in per-body for world-bounds triggers, controlling motion with velocity, acceleration, drag, and bounce properties.

Why do static bodies in Phaser not collide after scaling or moving?

Static bodies in Phaser require refreshing their transforms after scaling or moving the parent object, otherwise the collision area remains at the original position and fails to interact correctly with dynamic bodies.

Can I filter which objects collide using Phaser Arcade Physics?

Yes, you can filter collisions in Phaser Arcade Physics by applying collision category and mask bitmasks to restrict what specific bodies and groups collide with each other.

What is the best way to build a platformer with Phaser Arcade Physics?

The best way to build a platformer with Phaser Arcade Physics is combining world bounds, global gravity, static groups for platforms, and this.physics.add.collider to wire persistent collision logic between the player and environment.