Phaser API Documentation

  Version: 
setCollideWorldBounds([value], [bounceX], [bounceY])

Description:

Sets whether this Body collides with the world boundary.

Optionally also sets the World Bounce values. If the Body.worldBounce is null, it's set to a new Phaser.Math.Vector2 first.

Parameters:

name type arguments Default description
value boolean <optional> true

true if this body should collide with the world bounds, otherwise false.

bounceX number <optional>

If given this will be replace the worldBounce.x value.

bounceY number <optional>

If given this will be replace the worldBounce.y value.

Returns:
Description:

This Game Object.

Examples:
Since: 3.0.0