Phaser API Documentation

  Version: 
setPushable([value])

Description:

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 arguments Default description
value boolean <optional> true

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

Returns:
Description:

This Game Object.

Since: 3.50.0