Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

TileData

Inherits: Object

Settings for a single tile in a TileSet.

Description

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.

Properties

bool

flip_h

false

bool

flip_v

false

Material

material

Color

modulate

Color(1, 1, 1, 1)

float

probability

1.0

int

terrain

-1

int

terrain_set

-1

Vector2i

texture_origin

Vector2i(0, 0)

bool

transpose

false

int

y_sort_origin

0

int

z_index

0

Methods

void

add_collision_polygon(layer_id: int)

float

get_collision_polygon_one_way_margin(layer_id: int, polygon_index: int) const

PackedVector2Array

get_collision_polygon_points(layer_id: int, polygon_index: int) const

int

get_collision_polygons_count(layer_id: int) const

float

get_constant_angular_velocity(layer_id: int) const

Vector2

get_constant_linear_velocity(layer_id: int) const

Variant

get_custom_data(layer_name: String) const

Variant

get_custom_data_by_layer_id(layer_id: int) const

NavigationPolygon

get_navigation_polygon(layer_id: int, flip_h: bool = false, flip_v: bool = false, transpose: bool = false) const

OccluderPolygon2D

get_occluder(layer_id: int, flip_h: bool = false, flip_v: bool = false, transpose: bool = false) const

int

get_terrain_peering_bit(peering_bit: CellNeighbor) const

bool

is_collision_polygon_one_way(layer_id: int, polygon_index: int) const

void

remove_collision_polygon(layer_id: int, polygon_index: int)

void

set_collision_polygon_one_way(layer_id: int, polygon_index: int, one_way: bool)

void

set_collision_polygon_one_way_margin(layer_id: int, polygon_index: int, one_way_margin: float)

void

set_collision_polygon_points(layer_id: int, polygon_index: