Get collision group from tile coordinates or tile id

Hi,

Is there a way to get the collision group of a tile from it’s coordinates or tile id?

Something like tilemap.get_collisiongroup(tilemap, layer, x, y)
Or tilemap.get_collisiongroup(tilemap, tile_id)

Thanks in advance!

K

Unfortunately no, the functions listed are the ones available at this moment: tilemap

Thanks, I assumed so :slight_smile:

Any idea of how I could achieve a similar result?

Hmm. Assuming the tile id’s won’t change often, you can maintain a separate table in Lua to make the lookup from tile id to collision group.
You could even create a script that parses the .tilemap/.tilesource to create a .lua file with this information. (They are text based files)

1 Like

Is this still the case in 2024?

Yes.
While we have added tilemap.get_tile_info(), it seems it does lack the physics world.

1 Like