Node for 2D tile-based maps.
Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps.
Clear all cells.
Return the tile index of the referenced cell.
Return the cell size.
Return the tile index of the cell referenced by a Vector2.
Return true if tiles are to be centered in x coordinate (by default this is false and they are drawn from upper left cell corner).
Return true if tiles are to be centered in y coordinate (by default this is false and they are drawn from upper left cell corner).
Return the collision bounce parameter.
Return the collision friction parameter.
Return the collision layer.
Return the collision mask.
Return whether the tilemap handles collisions as a kinematic body.
Return the custom transform matrix.
Return the current half offset configuration.
Return the orientation mode.
Return the quadrant size.
Return the tile origin configuration.
Return the current tileset.
Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1).
Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector).
Return whether the referenced cell is flipped over the X axis.
Return whether the referenced cell is flipped over the Y axis.
Return the Y sort mode.
Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument.
Optionally, the tilemap's potential half offset can be ignored.
Set the tile index for the cell referenced by its grid-based X and Y coordinates.
A tile index of -1 clears the cell.
Optionally, the tile can also be flipped over the X and Y coordinates, transposed, or be given autotile coordinates.
Set the cell size.
Set the tile index for the cell referenced by a Vector2 of grid-based coordinates.
A tile index of -1 clears the cell.
Optionally, the tile can also be flipped over the X and Y axes or transposed.
Set tiles to be centered in x coordinate. (by default this is false and they are drawn from upper left cell corner).
Set tiles to be centered in y coordinate. (by default this is false and they are drawn from upper left cell corner).
Set the collision bounce parameter. Allowable values range from 0 to 1.
Set the collision friction parameter. Allowable values range from 0 to 1.
Set the collision layer.
Layers are referenced by binary indexes, so allowable values to describe the 20 available layers range from 0 to 2^20-1.
Set the collision masks.
Masks are referenced by binary indexes, so allowable values to describe the 20 available masks range from 0 to 2^20-1.
Set the tilemap to handle collisions as a kinematic body (enabled) or a static body (disabled).
Set custom transform matrix, to use in combination with the custom orientation mode.
Set a half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument).
Half offset sets every other tile off by a half tile size in the specified direction.
Set the orientation mode as square, isometric or custom (use MODE_* constants as argument).
Set the quadrant size, this optimizes drawing by batching chunks of map at draw/cull time.
Allowed values are integers ranging from 1 to 128.
Set the tile origin to the tile center or its top-left corner (use TILE_ORIGIN_* constants as argument).
Set the current tileset.
Set the Y sort mode. Enabled Y sort mode means that children of the tilemap will be drawn in the order defined by their Y coordinate.
A tile with a higher Y coordinate will therefore be drawn later, potentially covering up the tile(s) above it if its sprite is higher than its cell size.
Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument.
The custom [Transform2D] to be applied to the TileMap's cells.
Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED.
The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16.
The TileMap's cell size.
Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT.
If [code]true[/code] the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code].
Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0.
Friction value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 1.
The collision layer(s) for all colliders in the TileMap.
The collision mask(s) for all colliders in the TileMap.
If [code]true[/code] TileMap collisions will be handled as a kinematic body. If [code]false[/code] collisions will be handled as static body. Default value: [code]false[/code].
The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE.
The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s).
The assigned [TileSet].
Emitted when a tilemap setting has changed.
Returned when a cell doesn't exist.
Orthogonal orientation mode.
Isometric orientation mode.
Custom orientation mode.
Half offset on the X coordinate.
Half offset on the Y coordinate.
Half offset disabled.
Tile origin at its top-left corner.
Tile origin at its center.