Namespace: Static

Phaser.Physics.Matter.Components. Static

Provides methods used for getting and setting the static state of a physics body.

Since: 3.0.0
Source: src/physics/matter-js/components/Static.js (Line 9)

Methods


isStatic()

Returns true if the body is static, otherwise false for a dynamic body.

Since: 3.0.0
Source: src/physics/matter-js/components/Static.js (Line 34)
Returns:

true if the body is static, otherwise false.

Type
boolean

setStatic(value)

Changes the physics body to be either static true or dynamic false.

Parameters:
Name Type Description
value boolean

true to set the body as being static, or false to make it dynamic.

Since: 3.0.0
Source: src/physics/matter-js/components/Static.js (Line 17)
Returns:

This Game Object.

Type
Phaser.GameObjects.GameObject