The Arcade Physics World Bounds Event.
This event is dispatched by an Arcade Physics World instance if a body makes contact with the world bounds and
it has its onWorldBounds property set to true
.
It provides an alternative means to handling collide events rather than using the callback approach.
Listen to it from a Scene using: this.physics.world.on('worldbounds', listener)
.
name | type | description |
---|---|---|
body | Phaser.Physics.Arcade.Body |
The Arcade Physics Body that hit the world bounds. |
up | boolean |
Is the Body blocked up? I.e. collided with the top of the world bounds. |
down | boolean |
Is the Body blocked down? I.e. collided with the bottom of the world bounds. |
left | boolean |
Is the Body blocked left? I.e. collided with the left of the world bounds. |
right | boolean |
Is the Body blocked right? I.e. collided with the right of the world bounds. |