Phaser API Documentation

  Version: 
setAllowGravity([value])

Description:

Enables or disables gravity's effect on this Body.

Parameters:

name type arguments Default description
value boolean <optional> true

true to allow gravity on this body, or false to disable it.

Returns:
Description:

This Body object.

Since: 3.9.0