Namespace: Pushable

Phaser.Physics.Arcade.Components. Pushable

Provides methods used for setting the pushable property of an Arcade Physics Body.

Since: 3.50.0
Source: src/physics/arcade/components/Pushable.js (Line 7)

Methods


setPushable( [value])

Sets if this Body can be pushed by another Body.

A body that cannot be pushed will reflect back all of the velocity it is given to the colliding body. If that body is also not pushable, then the separation will be split between them evenly.

If you want your body to never move or seperate at all, see the setImmovable method.

Parameters:
Name Type Argument Default Description
value boolean <optional>
true

Sets if this body can be pushed by collisions with another Body.

Since: 3.50.0
Source: src/physics/arcade/components/Pushable.js (Line 15)
Returns:

This Game Object.

Type
Phaser.Physics.Arcade.Components.Pushable