Phaser API Documentation

  Version: 
<static> SeparateTile(i, body, tile, tileWorldRect, tilemapLayer, tileBias, isLayer)

Description:

The core separation function to separate a physics body and a tile.

Parameters:

name type description
i number

The index of the tile within the map data.

body Phaser.Physics.Arcade.Body

The Body object to separate.

tile Phaser.Tilemaps.Tile

The tile to collide against.

tileWorldRect Phaser.Geom.Rectangle

A rectangle-like object defining the dimensions of the tile.

tilemapLayer Phaser.Tilemaps.TilemapLayer

The tilemapLayer to collide against.

tileBias number

The tile bias value. Populated by the World.TILE_BIAS constant.

isLayer boolean

Is this check coming from a TilemapLayer or an array of tiles?

Returns:
Description:

true if the body was separated, otherwise false.

Type:
  • boolean
Examples:
Since: 3.0.0