Chunk Loading System not saving chunks correctly

I figured it out!!! For testing purposes, I created 2x2 tile chunks. Since I currently have only three biomes in my game, many of the chunks appear similar (i.e., all snow, grass, or sand). For some strange reason, 0,0’s position was getting changed to -2, -1 upon saving, and chunk -2, -1 looked exactly like 0,0 because of the aforementioned test chunk textures! I fixed it by resetting the chunk’s position to the correct one using the coordinates included in its name. Here’s the updated line, which is included immediately after the chunk is instanced!

chunk_instance.global_position = Vector2i(chunk_x, chunk_y) * Vector2i(tile_size, tile_size)
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.