physics-matter

Integrate Matter.js physics with Phaser 4 for 2D simulations.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/quochung-cyou/MissionSim --skill physics-matter-quochung-cyou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: physics-matter
Source: https://github.com/quochung-cyou/MissionSim/tree/main/skills/physics-matter
Command: npx skills add https://github.com/quochung-cyou/MissionSim --skill physics-matter-quochung-cyou

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires phaser, matter-js, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit solves the problem of incorporating Matter.js physics into Phaser 4, allowing for complex simulations and interactions.

Core Features & Use Cases

  • Matter.js Integration: Offers complete integration with Matter.js physics, enabling rigid body mechanics and physics-based interactions.
  • Rigid Bodies: Provides functions for creating and managing rigid bodies with various shapes.
  • Constraints: Supports creating joints and constraints for controlling interactions between bodies.
  • World Configuration: Allows fine-grained control over the physics world, including gravity, bounds, and timestep.
  • Use Case: This can be used to simulate a variety of physical systems, such as robotics, game physics, or interactive 2D simulations.

Quick Start

Create a Matter sprite and add it to the world with the this.matter.add.sprite(x, y, key, frame, options) method.

Frequently Asked Questions about physics-matter

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

FAQPage Schema
How do I add Matter.js rigid bodies to a Phaser 4 game?

To add Matter.js rigid bodies to a Phaser 4 game, use the `this.matter.add.sprite(x, y, key, frame, options)` method to create a sprite and add it to the physics world.

Does the Matter.js physics integration for Phaser 4 support constraints?

Yes, the Matter.js physics integration for Phaser 4 supports creating joints and constraints, enabling you to control complex interactions between rigid bodies in your simulation.

Can I configure world gravity and bounds in a Phaser 4 Matter.js simulation?

You can configure the Matter.js simulation world in Phaser 4 by adjusting gravity, bounds, and timestep settings, allowing fine-grained control over the physical behavior of objects.

What do I need to use Matter.js physics for 2D interactive demos in Phaser?

To use Matter.js physics for 2D interactive demos in Phaser, you need both the Phaser 4 game development framework and the Matter.js physics engine library installed as dependencies.

When should I use Matter.js physics in Phaser 4 for game development?

Use Matter.js physics in Phaser 4 for game development, educational simulations, or interactive demos requiring realistic physical behavior, such as robotics and complex rigid body mechanics.

Does this physics integration support creating rigid bodies with various shapes?

Yes, the physics integration provides functions for creating and managing rigid bodies with various shapes, allowing for diverse and complex object interactions within the 2D simulation.