Tilemap unique per tile "visual" offset/displace

You can change individual TileData information by implementing both TileMap._use_tile_data_runtime_update() and TileMap._tile_data_runtime_update()

For example:

extends TileMap


func _use_tile_data_runtime_update(layer: int, coords: Vector2i) -> bool:
	return true


func _tile_data_runtime_update(layer: int, coords: Vector2i, tile_data: TileData) -> void:
	tile_data.texture_origin += Vector2i(0, randi_range(-10, 10))


func _process(delta: float) -> void:
	notify_runtime_tile_data_update(0)

I didn’t take any measures to avoid updating tiles that don’t need to be updated, you should do that if possible.

Result:

1 Like