Hello
I am having real issues with creating a local grid system based on some anchor.I define my grid span as having a size (say 10 by 10) and a centre point on the XZ plane ( x, 0, z). My grid sizes vary and are not necessarily 1 by 1. So everything uses floats.Then i draw out my grid and i get problems due to imprecision and i do not see any way in which to solve this.
This forum is buggy as all hell when posting code, so i had to post it here:
https://pastebin.com/8dtLNpwN
This is what happens if i move the center position of my grid:
https://i.imgur.com/tQoRI3c.gif
It seems the imprecision causes the for loop to some times not do enough iterations, some times 1 too many or 1 too few. I can't figure out how to solve this, has any one made a grid system based on a local position ? Because it seems largely impossible ???