Namespace: Gravity

Phaser.Physics.Matter.Components. Gravity

A component to manipulate world gravity for Matter.js bodies.

Since: 3.0.0
Source: src/physics/matter-js/components/Gravity.js (Line 7)

Methods


setIgnoreGravity(value)

A togglable function for ignoring world gravity in real-time on the current body.

Parameters:
Name Type Description
value boolean

Set to true to ignore the effect of world gravity, or false to not ignore it.

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

This Game Object.

Type
Phaser.GameObjects.GameObject