physics-matter

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

3|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/Autinhorse/levelcraft --skill physics-matter-autinhorse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: physics-matter
Source: https://github.com/Autinhorse/levelcraft/tree/main/games/docs/phaser-skills/physics-matter
Command: npx skills add https://github.com/Autinhorse/levelcraft --skill physics-matter-autinhorse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the process of implementing and managing complex physics simulations within Phaser 4 using Matter.js, reducing development time and complexity.

Core Features & Use Cases

  • Physics Integration: Easily set up rigid bodies, constraints, sensors, and collision filtering for game objects.
  • Advanced Physics: Supports complex shapes, composite bodies, soft bodies, and constraints like joints and springs.
  • Use Case: Create a side-scrolling platformer with realistic physics behaviors, accurate collision detection, and dynamic object interactions.

Quick Start

Use the physics-matter skill to set up a scene with gravity, static platforms, and dynamic characters by configuring the scene and adding Matter physics-enabled objects.

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 a Phaser 4 game, you can use this Skill to easily set up rigid bodies, constraints, sensors, and collision filtering for your game objects. It simplifies managing complex physics simulations and reduces development time.

Does this Skill support complex physics shapes and soft bodies in Matter.js?

Yes, this Matter.js integration supports advanced physics features including complex shapes, composite bodies, soft bodies, and constraints like joints and springs. This enables the creation of highly realistic physics behaviors and dynamic object interactions in Phaser 4.

What do I need to set up Matter.js collision detection and sensors in Phaser 4?

You need both Phaser 4 and Matter.js to enable advanced physics interactions using this Skill. It allows you to configure scenes with gravity, static platforms, dynamic characters, and collision filtering by adding Matter physics-enabled objects.

Can I build a side-scrolling platformer with realistic physics using Phaser 4 and Matter.js?

Yes, you can build a side-scrolling platformer with realistic physics behaviors, accurate collision detection, and dynamic object interactions. This Skill provides comprehensive support for configuring rigid bodies and constraints suitable for detailed game mechanics.

Why use Matter.js for game physics instead of other Phaser 4 physics engines?

Matter.js provides advanced physics simulations within Phaser 4, specifically supporting complex shapes, composite bodies, soft bodies, and constraints like joints and springs. This approach is ideal for detailed game physics and mechanics requiring realistic dynamic interactions.

What are the limitations of using Matter.js physics in Phaser 4?

This Skill requires both Phaser 4 and Matter.js to function, meaning your project must support these dependencies. It is tailored for advanced physics simulations, which may introduce complexity if your game only requires basic collision detection.