Hello all, I'm working on a tile based movement demo as my first game. I'm using the example provided in the engine as a template, so all the functions are the same. I want this scene to be reusable so I am trying to get it to be resizeable. To accomplish this I moved all elements to position (0, 0) which worked out great. I was able to resize the camera and have a Node2D that I use to create the grid only draw the grid that fits inside of the camera. The issue is that when the TileMap was at position (0, 0), the map_to_world() function only seemed to work on the bottom right quadrant. To remedy this, I thought that in the ready function for the TileMap I would set it's top left position to the same as the top left position of the grid I drew. This also worked but it still acts as if the TileMap is at quadrant (0, 0), the difference being that it takes the input from the bottom right of my screen and acts like it is in the top left. To me it looks like the map_to_world() function is still converting that position in the world to the origin of the TileMap, almost like an offset. This is the starting position and when I click on the red square this is what happens. I think it should be noted that the origin of the TileMap should be in top left corner of that top left square. This is what my project looks like. I set the position of the TileMap in the TileMap's script. It also sets the position of the left and right Position2Ds as well which might be relevant. All they are used for is to calculate the zoom needed to zoom the camera as well as constraints on how the grid should be drawn. From my understanding the player is loaded in after the TileMap so there shouldn't be any issue there but if I'm wrong please correct me. Any help would be appreciated and if you need any further information please let me know and I'll try to update as fast as I can. Thanks.
Also important to note, the only inputs that seem to work is when I click to the bottom right of the origin which is where the player sprite spawns in the first picture. Anything to the left or above the player spawn is ignored.