How to make character sense ground

I made a bool called “grounded” for an animation controller, so that anytime my character is on the ground, it can only do certain animations. But how do I make it know when it’s on the ground, so it can only do idle or walking animations on the floor, and jumping animations in air?

There are a lot of tutorials for how to make a character controller which usually includes a ground check. It may help to look at this post from the forums:

This should work, add these variables:

[SerializeField, Tooltip("Transform where grounded will be checked")] private Transform isGroundedPoint;

[SerializeField, Tooltip("The range of the grounded point")] private float isGroundedRange;

[SerializeField, Tooltip("Ground Layer")] private LayerMask isGroundedLayer;

And then add this function:

    private bool IsGrounded()
        Collider[] collisions  = Physics.OverlapSphere(isGroundedPoint.position,
            isGroundedRange, isGroundedLayer.value);

        return collisions.Length > 0;

When calling IsGrounded(), it will return TRUE if it’s touching the ground.

The ground layer, you have to set one, this layer should be put on all of your grounds.
To create a Layer just click Add Layer, and give it to all of your ground objects