I have spheres which are randomly generated on a grid. I want to know which of these spheres are within a certain distance from another sphere.
How can I go about doing this? I have read about collision detection but I don’t want to know when the spheres collide – only if they are close to each other. I later want to use this for collision avoidance.