How to throw a ray under the character in any position

RaycastHit rh;
if (Physics.Raycast(new Vector3(transform.localPosition.x, transform.localPosition.y + 0.2f, transform.localPosition.z), transform.TransformDirection(Vector3.down), out rh, 0.5f))
{
IsGround = true;
}
else
{
IsGround = false;
}

113709-безымянныи.png

@harizmarok
Try this:

    RaycastHit rh;
    if (Physics.Raycast(transform.position, -transform.up, out rh, 1f))
    {
        IsGround = true;
    }
    else
    {
        IsGround = false;
    }