Don’t use boxcast or any of the physics stuff. Just store what’s in each grid cell and do the logic there.
Tile-based / grid-based 2D games: match3, tetris, chips challenge, rogue, etc:
For any tile-based game such as Match3 or Tetris or a grid-based Roguelike, do all the logical comparisons in your own data storage mechanism for the tiles, such as a 2D array of tiles.
Otherwise you needlessly bind your game logic into Unity objects and the Unity API, making it about 100x more complicated than it needs to be.
If you have no idea how to work with 2D arrays, hurry to some basic C# tutorials for the language portions of it, then look at any good tutorial that uses a 2D array
Here is my Match3 demo using this technique of storing data in a grid. Full source linked in game comments.
It stores all of its data in a 2D array:
PieceController[,] Board;
This allows for easy simple checking in code, not relying on anything like physics.
You should strive to use that pattern for all logic, then only use Unity to present what is happening in the game logic.
Here’s some cool reading about how the OG Pacman enemies worked:
http://gameinternals.com/understanding-pac-man-ghost-behavior
Also, for future reference:
If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly