Alright so I have a grid system that works fine and until recently I did not notice it has a fundamental flaw that is not an issue until I have more than 500 rows in the X direction.
The issue is in this function below that creates the initial array.
I know it’s 100% in this part of the logic because I even loaded just this function and printed out the length of the map and it does not add up to how many should be in there.
Example: if I have 100 Grid Size X and 100 Grid Size Y the length will be 10,000 as expected but when ever I have a Row X of higher than 500 it will not add up or maybe its rewriting the same index I am not sure but
If I set the Size of X and Y to 1000 each for example I should have a Map length of 1,000,000 but instead It gets a map length of 249,000.
I can’t seem to figure out what is causing this.
Now I know this isn’t exactly an array, but I did test it with an array instead of a map with the same logic and got the same result.