Im creating a word game and Im at the point where I can select a letter(sphere) and deselect a sphere. I can also click a button to check if the word is in a text file.
And now I need some direction on setup and how to only select a sphere that’s connected. Here is an image to help explain the connected part:

Right now I have 9 columns each column has 7 sphere’s(letters) in it. The columns were made up of box colliders to hold the spheres because the spheres use gravity to fall down but that didn’t seem to work out so well and I really dont know how to see if they are connected.
Im using simple raycasting to select and deselect them and right now I can select or deselect any number of them weather connected or not. Any advice on which ways to go with this?