# TileMap issues

Attention Topic was automatically imported from the old Question2Answer platform.

I need my explosion to destroy tiles, but when the explosion area collides with the tilemap, it returns: `[TileMap:1278]`, meaning I cannot get an individual tile’s position.

The whole point of a TileMap is that the tiles are batched together and treated as a single image and a single collider. This makes tilemaps much more efficient, but means you can’t treat individual tiles as separate objects.

If you want to find which tiles are affected by the explosion, you’ll have to find that using the explosion’s position - convert it to map coordinates using `world_to_map()` - and calculating the tiles that are within a certain distance of that point. You can remove a tile by setting its index to `-1`.

I already came to that conclusion - I wanted to know if there was a better way.

What’s the best way of calculating what tiles were hit? My explosion is circular, so I cannot use Rect2.

GodotNoob999 | 2018-06-12 17:52

The “Midpoint Circle Algorithm” is probably your best bet here. Here’s a starting point I found with a quick search: 2d - How can I calculate "All squares within R" in a natural looking manner? - Game Development Stack Exchange

kidscancode | 2018-06-12 18:02

``````func purge_circle(pos, radius):