2d Raycast not work

Hi! i need to detect the ground with a raycast to activate the falling animation, i use this code, but not work, the code detect the ground all time. Thanks! :slight_smile:

public class Player : MonoBehaviour
    {
    public float distanceGround;
    public bool isGrounded = false;
    
    void Start()
        {
            distanceGround = GetComponent<Collider2D>().bounds.extents.y;
        }
    
     void FixedUpdate()
        {
            //Movement
            rb2d.MovePosition(rb2d.position + mov * speed * Time.deltaTime);
    
            //Falling raycast
    
            if (!Physics2D.Raycast(transform.position, -Vector2.up, + 0.1f))
            {
                isGrounded = false;
                print("air");
            }
            else
            {
                isGrounded = true;
                print("ground");
            }

Try going to Edit > Project Settings > Physics 2D and uncheck Queries Start In Colliders. It should look like this: