TileData object represents a single tile in a TileSet. It is usually edited using the tileset editor, but it can be modified at runtime using TileMap._tile_data_runtime_update().
Emitted when any of the properties are changed.
If true
, the tile will have its texture flipped horizontally.
If true
, the tile will have its texture flipped vertically.
The Material to use for this TileData. This can be a CanvasItemMaterial to use the default shader, or a ShaderMaterial to use a custom shader.
Color modulation of the tile.
Relative probability of this tile being selected when drawing a pattern of random tiles.
ID of the terrain from the terrain set that the tile uses.
ID of the terrain set that the tile uses.
Offsets the position of where the tile is drawn.
If true
, the tile will display transposed, i.e. with horizontal and vertical texture UVs swapped.
Vertical point of the tile used for determining y-sorted order.
Ordering index of this tile, relative to TileMap.
Adds a collision polygon to the tile on the given TileSet physics layer.
Adds an occlusion polygon to the tile on the TileSet occlusion layer with index layer_id
.
Returns the one-way margin (for one-way platforms) of the polygon at index polygon_index
for TileSet physics layer with index layer_id
.
Returns the points of the polygon at index polygon_index
for TileSet physics layer with index layer_id
.
Returns how many polygons the tile has for TileSet physics layer with index layer_id
.
Returns the constant angular velocity applied to objects colliding with this tile.
Returns the constant linear velocity applied to objects colliding with this tile.
Returns the custom data value for custom data layer named layer_name
. To check if a custom data layer exists, use has_custom_data().
Returns the custom data value for custom data layer with index layer_id
.
Returns the navigation polygon of the tile for the TileSet navigation layer with index layer_id
.
flip_h
, flip_v
, and transpose
allow transforming the returned polygon.
Deprecated: Use get_occluder_polygon() instead.
Returns the occluder polygon of the tile for the TileSet occlusion layer with index layer_id
.
flip_h
, flip_v
, and transpose
allow transforming the returned polygon.
Returns the occluder polygon at index polygon_index
from the TileSet occlusion layer with index layer_id
.
The flip_h
, flip_v
, and transpose
parameters can be true
to transform the returned polygon.
Returns the number of occluder polygons of the tile in the TileSet occlusion layer with index layer_id
.
Returns the tile's terrain bit for the given peering_bit
direction. To check that a direction is valid, use is_valid_terrain_peering_bit().
Returns whether there exists a custom data layer named layer_name
.
Returns whether one-way collisions are enabled for the polygon at index polygon_index
for TileSet physics layer with index layer_id
.
Returns whether the given peering_bit
direction is valid for this tile.
Removes the polygon at index polygon_index
for TileSet physics layer with index layer_id
.
Removes the polygon at index polygon_index
for TileSet occlusion layer with index layer_id
.
Enables/disables one-way collisions on the polygon at index polygon_index
for TileSet physics layer with index layer_id
.
Sets the one-way margin (for one-way platforms) of the polygon at index polygon_index
for TileSet physics layer with index layer_id
.
Sets the points of the polygon at index polygon_index
for TileSet physics layer with index layer_id
.
Sets the polygons count for TileSet physics layer with index layer_id
.
Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile.
Sets the constant linear velocity. This does not move the tile. This linear velocity is applied to objects colliding with this tile. This is useful to create conveyor belts.
Sets the tile's custom data value for the TileSet custom data layer with name layer_name
.
Sets the tile's custom data value for the TileSet custom data layer with index layer_id
.
Sets the navigation polygon for the TileSet navigation layer with index layer_id
.
Deprecated: Use set_occluder_polygon() instead.
Sets the occluder for the TileSet occlusion layer with index layer_id
.
Sets the occluder for polygon with index polygon_index
in the TileSet occlusion layer with index layer_id
.
Sets the occluder polygon count in the TileSet occlusion layer with index layer_id
.
Sets the tile's terrain bit for the given peering_bit
direction. To check that a direction is valid, use is_valid_terrain_peering_bit().