I'm trying to make so there is a tile map with a wall sprite, and when the player moves under the wall it turns transparent. But i have a problem that when i change one tile, all the other tiles get modified and turns transparent, and i cant really figure it out how to copy. here is the code:
func _on_body_shape_entered(body_rid, body, body_shape_index, local_shape_index):
var mapped_cords = body.local_to_map(player.position)
var data = body.get_cell_tile_data(1, mapped_cords)
if data:
data.modulate.a = 0.3