LineCastAll doesnt return anything

I’m working on an assignment and getting stuck at this strange behavior of linecastall 2d.

Initially, I set the start point to be the center of the square [(0.5,0.5) offset from bottom left pivot of the bomb sprite], and this works if the objects with collider are completely within the square on the bomb path.

Now, I try to do 2 line cast instead of 1 to catch any collider close to center of the square, and its not working.

All sprites are set with default layer

For example if the world position of the bomb is (0.0,0.0), then initially, I use linecastall 1 time at point (0.5,0.5) to (0.5 +radius+0.5, 0.5. Then, in case of using 2 linecastall, I used 2 different start point: (0.5,0.2) to (0.5 + radius +0.5, 0.2); and (0.5,0.8) to (0.5 + radius +0.5, 0.8)

Result is that the method doesnt return any collider, even though if I keep the code and drag the sprite with collider to be perfectly snapped to the grid, then it will do

Any idea what I should do? I read about boxcastall but people say it is more expensive doing so.
Also heres the code:


I tested a lil more and see that this seems to happen when I do linecastall 2nd time…

Vector3 findStartPointToLineCast(string direction, Vector3 input, float offset){
    if (direction == "left" || direction == "right")
        return (input + new Vector3(0.0f,offset,0.0f));
    return (input + new Vector3(offset,0.0f,0.0f)); // up/down
}

void SpawnExplosionInGivenDirection(Vector3 bombCenter, Vector3 end, string direction, Vector3 bombPos){

    // 1. 1st linecast
    Vector3 startPoint = findStartPointToLineCast (direction,bombCenter,0.3f);
    RaycastHit2D[] detectedObjects_no1 = Physics2D.LinecastAll(startPoint, startPoint + end);
    // handle the return raycasthit

    // do another linecast
    startPoint = findStartPointToLineCast (direction,bombCenter,-0.3f);
    RaycastHit2D[] detectedObjects_no2 = Physics2D.LinecastAll(startPoint, startPoint + end);
    // handle the return raycasthit

}
int radius = 4; // for testing
void triggerBomb(){
    Vector3 bombpos = transform.position;
    Vector3 bombCenter = bombpos + new Vector3(0.5f,0.5f,0.0f);

    GameObject expCenter = Instantiate (Resources.Load ("Prefabs/explosion")) as GameObject;
    expCenter.transform.position = bombpos;
    SpawnExplosionInGivenDirection (bombCenter, new Vector3 (radius*(-1.0f)-0.5f,0.0f,0.0f), "left", bombpos);
    SpawnExplosionInGivenDirection (bombCenter, new Vector3 (radius*(1.0f)+0.5f,0.0f,0.0f), "right", bombpos);
    SpawnExplosionInGivenDirection (bombCenter, new Vector3 (0.0f, radius*(1.0f)+0.5f,0.0f), "up", bombpos);
    SpawnExplosionInGivenDirection (bombCenter, new Vector3 (0.0f, radius*(-1.0f)-0.5f,0.0f), "down", bombpos);
}

I found the bug … I made a silly copy_paste mistake when handling the returned raycasthit2d 2nd time =__=

So basically this is the old code

startPoint = findStartPointToLineCast (direction,bombCenter,-0.2f);
RaycastHit2D[] detectedObjects_no2 = Physics2D.LinecastAll(startPoint, startPoint + end);
if (detectedObjects_no1.Length != 0) {
    //do stuffs        
}

And this is how its supposed to be:

startPoint = findStartPointToLineCast (direction,bombCenter,-0.2f);
RaycastHit2D[] detectedObjects_no2 = Physics2D.LinecastAll(startPoint, startPoint + end);
if (detectedObjects_no2.Length != 0) {
    //do stuffs        
}