Raycast on left side and right side of the player

Hi !
In order to move my player in my game I use raycasting. I succeed in check if there is a cube in front of, below and in front down direction of my sphere. But I have a lot of trouble for checking left side and right side of my player.

This is the part of code I use to guide the ray:

void calculRay()
{
    rayFrontDirection = transform.right;
    rayDownDirection = -transform.up;
    rayFrontDownDirection = transform.right - transform.up * 0.5f;
}

I would like to raycast on a LeftDownDirection and a RightDownDirection, have you got any tips please ?

Thank you for you help !

hey, I guess you can Raycast from the player’s collider’s position and for direction maybe you can use Vector3.one and use a distance of Mathf. infinity so you have infinitely long ray in all directions.

private BoxCollider _playerBoxCollider;

void Update()
{
 RaycastHit hit;
 if (Physics.Raycast(_playerBoxCollider.bounds.center, Vector3.one, out hit, Mathf.Infinity)
{
if (hit.collide != null)
{
// your check/logic here
}
}
}