Box Raycasting Not Detecting Blocks at 45°

Hi everyone.
I was just trying to raycast from my character to detect the ground.
Everything worked fine (after a lot of attempts), until I tryied to test it with slopes.
It works even with slopes (I think), but for some reason the raycasting don’t detect a specific cube.
And is not only that cube. Even duplicating a working one and placing it in a similar spot of the not-working one, don’t resolve anything.

As you can see, I duplicated the not working one and moved it a little. The duplicated one don’t work too.
I have absolutely no Idea why this is happening. I tryed to troubleshoot it as far as my beginner knowledge goes but that doesn’t resolved or cleared anything.

In the bottom right corner you can see also the code (visual script) of the raycasting, that is applayed to the ball:
As you can see, in the center the “Get Transform” value returns a Null when raycasting those cubes.

In the inspector in the top right you can see the properties of the not-working cube, that are identical, except for the transform coordinates and rotation, to the other cubes.

And in the inspector in the bottom left corner there are all the settings for the player character (ball).

Any idea? Thank you

I’m not sure why but changing the box raycast half extent Y from 0.4 to 0.3 (or 0.1 even better) solves it.
I have absolutely no idea why this happens. If someone can explain it to me.

After doing some troubleshooting I might have figured out the reason.
I was using a box raycast with a sphere collision mesh. This caused the ground, on survaces around 45°, to clip through the corner of the box raycast, thus being before the raycast.
Reducing the box raycast half extent Y reduced the possibility of clipping.

The real solution to this problem is to use a sphere raycast instead a box one.