Hello,
I have a procedural grid setup, where each tile perfectly matches the size of each node in a layered grid graph. I can reference each tile in my tilemap with a row and column coordinate, but am unsure on how to find a node using similar approach.
I have looked at GetNodesInRegion(Bounds bounds)
, but it requires that I create a bounds object in order to pass as an argument. I was hoping to get a node quicker without creating a bounds object every time.
I have also looked at GetNearest (Vector3 position)
, but I am worried that a position perfectly in-between two nodes could lead to problems.
Is there a way I can just give 2 coordinates and get back a node? Here is a random image I found showing the general idea: https://wiki.osgeo.org/images/e/e7/Tms.png . So the bottom left node of a grid is (0,0), to it’s right is (1,0) and so forth.