bevy_ecs_tilemap
bevy_ecs_tilemap copied to clipboard
fix renderer removing packed tile data on swapped tiles
Fixes #559.
Problem
The render checks to see if the tile's old position and new position do not match and it greedily remove's it from the chunk at that old position. If a tile earlier in the iteration was placed at that tile's old location it will be removed and the tile data is lost.
Solution
We introduce a set and use it to check if the tile's old position in the chunk was updated by an entity in a previous iteration.