Phaser API Documentation

  Version: 
setBoundsRectangle([bounds])

Description:

Sets a custom collision boundary rectangle. Use if you want to have a custom boundary instead of the world boundaries.

Parameters:

name type arguments description
bounds Phaser.Geom.Rectangle <optional>

The new boundary rectangle. Pass null to use the World bounds.

Returns:
Description:

This Body object.

Since: 3.20