physics-matter

Integrate Matter.js rigid bodies, constraints, and collision filtering into Phaser 4 scenes.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/tja688/WebGameDevPlace --skill physics-matter-tja688
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: physics-matter
Source: https://github.com/tja688/WebGameDevPlace/tree/main/.claude/skills/physics-matter
Command: npx skills add https://github.com/tja688/WebGameDevPlace --skill physics-matter-tja688

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill simplifies the integration and configuration of complex 2D physics simulations within Phaser 4, removing the friction of manual engine setup and body management.

Core Features & Use Cases

  • Advanced Physics Simulation: Supports rigid bodies, compound shapes, constraints, sensors, and collision filtering.
  • Game Object Integration: Seamlessly injects physics components into Sprites and Images with support for animations and custom shapes.
  • Use Case: Use this skill to build complex game mechanics like ragdoll physics, destructible environments, or intricate puzzle systems involving joints and springs.

Quick Start

Use the physics-matter skill to initialize a new Matter.js physics world in your Phaser scene and add a dynamic sprite with custom collision properties.

Frequently Asked Questions about physics-matter

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

FAQPage Schema
What are the limitations of using Matter.js for 2D physics in Phaser?

Matter.js is strictly for high-fidelity 2D physics simulation in Phaser, meaning it cannot handle 3D physics tasks. It is optimized for complex rigid body interactions rather than simple arcade-style hitboxes.

Can I use custom collision filtering and sensors with Matter.js in Phaser 4?

Matter.js in Phaser 4 fully supports collision filtering and sensors for interactive game objects. This allows precise control over which physics bodies interact within your simulation.

How do I inject Matter.js physics components into Phaser Sprites?

You inject Matter.js physics components directly into Phaser Sprites and Images to enable physics simulation. This integration supports animations and custom shapes for high-fidelity 2D game objects.

Does Phaser 4 support debug rendering for Matter.js physics bodies?

Yes, Phaser 4 supports debug rendering for Matter.js physics bodies during world configuration. This helps visualize rigid bodies, constraints, and sensors to ensure accurate collision simulation.

What are the limitations of using Matter.js for 2D physics in Phaser?

Matter.js is strictly for high-fidelity 2D physics simulation in Phaser, meaning it cannot handle 3D physics tasks. It is optimized for complex rigid body interactions rather than simple arcade-style hitboxes.