Phaser API Documentation

  Version: 
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Event: TILE_COLLIDE
Phaser.Physics.Arcade.Events.TILE_COLLIDE
TILE_COLLIDE

Description:

The Arcade Physics Tile Collide Event.

This event is dispatched by an Arcade Physics World instance if a body collides with a Tile and has its onCollide 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('tilecollide', listener).

Please note that 'collide' and 'overlap' are two different things in Arcade Physics.

Parameters:

name type description
gameObject Phaser.GameObjects.GameObject

The Game Object involved in the collision. This is the parent of body.

tile Phaser.Tilemaps.Tile

The tile the body collided with.

body Phaser.Physics.Arcade.Body

The Arcade Physics Body of the Game Object involved in the collision.

Since: 3.16.1