Namespace: Matter

Phaser.Physics. Matter

Classes

Factory
Image
MatterPhysics
PointerConstraint
Sprite
TileBody
World

Namespaces

Components
Events
PhysicsEditorParser

Methods


<static> MatterGameObject(world, gameObject, options)

[description]

Parameters:
Name Type Description
world Phaser.Physics.Matter.World

The Matter world to add the body to.

gameObject Phaser.GameObjects.GameObject

The Game Object that will have the Matter body applied to it.

options object | MatterJS.Body

A Matter Body configuration object, or an instance of a Matter Body.

Since: 3.3.0
Source: src/physics/matter-js/MatterGameObject.js (Line 26)
Returns:

The Game Object that was created with the Matter body.

Type
Phaser.GameObjects.GameObject