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