physics-matter

Integrates and configures Matter.js physics in Phaser 4 projects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers implement and tune Matter.js physics within Phaser 4 games, turning a challenging integration task into a manageable setup with clear guidance.

Core Features & Use Cases

  • Physics integration: Setup Matter.js with Phaser 4, create bodies, constraints, and sensors, and manage world boundaries and gravity.
  • Advanced features: Work with composites, joints, collision filtering, sensors, tilemap integration, and debug rendering to diagnose physics.
  • Use Case: Build a platformer or physics-based puzzle where rigid bodies collide, constraints constrain movement, and sensors trigger events.

Quick Start

Set up a Phaser 4 scene with Matter.js enabled and create a dynamic body and static ground to observe interactions.

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

To integrate Matter.js physics in Phaser 4, you configure the physics world settings, create dynamic and static rigid bodies, and manage gravity and world boundaries. This provides a robust foundation for interactive game physics.

What is the best way to set up collision filtering and sensors in Phaser 4?

Collision filtering and sensors in Phaser 4 are configured through Matter.js body properties to detect overlaps without physical bouncing. Sensors trigger specific game events while collision filtering controls which rigid bodies interact.

Can I use Matter.js constraints and joints to build physics-based puzzles in Phaser 4?

Matter.js constraints and joints in Phaser 4 restrict rigid body movement and connect multiple objects together. You can build physics-based puzzles by configuring these joints alongside composites to create complex interactive mechanisms.

How do I configure Matter.js rigid bodies to work with Phaser 4 tilemaps?

Matter.js rigid bodies integrate with Phaser 4 tilemaps by converting tile layers into static physics bodies. This allows dynamic game objects to collide seamlessly with the level geometry defined in your tilemap data.

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

Phaser 4 supports debug rendering for Matter.js physics, allowing you to visualize rigid bodies, sensors, and constraints. This diagnostic feature helps developers tune physics interactions and identify collision issues during development.

Why are my Matter.js rigid bodies falling through the ground in Phaser 4?

Matter.js rigid bodies falling through the ground in Phaser 4 usually indicates missing static body configuration or incorrect world boundaries. Setting up a static ground body and verifying collision filtering resolves this physics overlap.