Wrap an object's coordinates (or several objects' coordinates) within Phaser.Physics.Arcade.World#bounds.
If the object is outside any boundary edge (left, top, right, bottom), it will be moved to the same offset from the opposite edge (the interior).
name | type | arguments | description |
---|---|---|---|
object | any |
A Game Object, a Group, an object with |
|
padding | number | <optional> |
An amount added to each boundary edge during the operation. |