Topic was automatically imported from the old Question2Answer platform.
Asked By
rogerdv
Is it possible to remove tiles during runtime? I need to destroy some walls parts in a game, which is an ideal candidate to use tilemaps, but Im concerned that I cant selectively destroy elements.
void set_cell ( int x, int y, int tile, bool flip_x=false, bool flip_y=false, bool transpose=false, Vector2 autotile_coord=Vector2( 0, 0 ) )
Sets the tile index for the cell given by a Vector2.
An index of -1 clears the cell.
Do they have some sort of collider to let me identify individual collisions?
rogerdv | 2019-12-23 18:02
The whole point of a TileMap is that individual textures and colliders are batched into a single object for performance. That said, when you collide with the TileMap, you can then use the collision position to determine which particular tile you collided with.