Hello everyone,
I'm working on a city-building game where the players will make their unique cities by placing various buildings on a procedurally generated world map. I'm done with the map generation, but I'm stuck with putting buildings on the land.
as you can see in the image, I've selected the tile at position (-21, -21) and when I convert the position from map to world I get the coordinates as follows: (-672, -672). But when I click on that spot with my mouse and try to get the position of the pointer I get x and y coordinates around 60 or 50 which is with respect to the viewport as it starts from the top left corner. I want to get the value of coordinates respective to the world not to the viewport. Please help. You can answer in both c# and GdScript.
Thanks in advance!!!