I’ve made a function that places vectors in a list making a grid, and I want to somehow highlight which vector or grid that is selected (When the mouse is hovering over it). I tried putting the Vectors in a list and then for each vector I would do the “if distance is less than closest, closest = distance” and than worked when I only hade a few grid but when I made the map bigger it became a problem.
I then started thinking about making like a OverlapSpherethat would get only the closest vectors and then find out which one of those vectors are the closest. But the thing is I don’t know how to make the OverlapSphere only check those vectors. (I can’t really make them into gameobjects due to performance on larger maps i think, not sure about that though).
If you have any other ideas please feel free to tell me.
Thanks.