Phaser API Documentation

  Version: 
wrapObject(object, [padding])

Description:

Wrap an object's coordinates within Phaser.Physics.Arcade.World#bounds.

Parameters:

name type arguments description
object *

A Game Object, a Physics Body, or any object with x and y coordinates

padding number <optional>

An amount added to the boundary.

Examples:
Since: 3.3.0