Tilemap.set_constant() to specified layer

Would be useful to be able to set a shader constant to a particular layer of a tilemap using tilemap.set_constant(): https://defold.com/ref/stable/tilemap/#tilemap.set_constant

Walking behind a wall or underneath a roof for example would set the tiles in an overhead layer to semi-transparent like so: tilemap.set_constant("#tilemap", "overhead", "tint", vmath.vector3(1, 1, 1, 0.5)).

1 Like

The material is currently set on the tilemap component and used for all layers. This is likely not something we would change soon. Your best bet here is to use multiple tilemaps.

1 Like