physics-matter

Integrate Matter.js rigid bodies, joints, and sensors into Phaser 4 projects.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/kehwar/pixi-square --skill physics-matter-kehwar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: physics-matter
Source: https://github.com/kehwar/pixi-square/tree/main/.agents/skills/physics-matter
Command: npx skills add https://github.com/kehwar/pixi-square --skill physics-matter-kehwar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide to integrating Matter.js physics into Phaser 4, solving the complexity of setting up realistic physics with rigid bodies, joints, sensors, and advanced shapes.

Core Features & Use Cases

  • Full-body physics with Matter.js in Phaser 4, including rigid bodies, composite bodies, constraints, and sensors.
  • Collision filtering, world configuration (gravity, bounds), and tilemap integration for game environments.
  • Practical examples and patterns for debugging and interactive gameplay, such as pointer dragging, events, and collisions.

Quick Start

Configure a Phaser 4 project with Matter.js enabled and load a sample scene to observe rigid bodies, constraints, and sensors in action.

Frequently Asked Questions about physics-matter

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

FAQPage Schema
How do I integrate Matter.js physics into a Phaser 4 game?

To integrate Matter.js physics into Phaser 4, configure a Phaser project with Matter.js enabled and load a scene using the Scene plugin to observe rigid bodies, constraints, and sensors in action.

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

Yes, Matter.js in Phaser 4 supports collision filtering and sensors. You can configure world bounds, gravity, and utilize event-driven interactions to handle collisions and pointer dragging.

How do I set up tilemap collision using Matter.js in Phaser 4?

You can set up tilemap collision by configuring the Matter.js world and integrating tilemap environments, allowing rigid bodies to interact seamlessly with the game level boundaries and platforms.

Does Phaser 4 support composite bodies and constraints with Matter.js?

Yes, Phaser 4 supports full-body physics with Matter.js, enabling the creation of composite bodies, constraints, joints, and advanced shapes for complex mechanical interactions in your game.

What is the best way to debug rigid body physics in Phaser 4?

The best way to debug rigid body physics in Phaser 4 is by using the provided practical patterns for debugging interactive gameplay, allowing you to monitor pointer dragging, events, and collision interactions effectively.