Detect Falling

So i wanna detect if my rigidbody character is falling, if he’s falling from shorter distance then he will just use an animation of falling, untill his feets touch the ground again, and then when they touch it, it will play roll animation. But if he’s falling from bigger distance than the first one, then he will play a falling animation, and when his feets hit the ground again, he play a die animation. I HAVE NO idea how to do this, so complicated, and don’t think i’m a noob, i have experience in unity, but never came to this situation, and i’m so nervous right now and i’m typing so fast, so don’t mind the gramathic mistakes please. I need this so much please anyone.

There:
Well i tryed but it didn’t work, i can’t make it work, i did it like this:

dist1 = FallToDeathMaxDis;
dir = transform.TransformDirection (Vector3.down);

   Debug.DrawRay(transform.position,dir*dist1,Color.green);



   if(Physics.Raycast(transform.position,dir,dist1))
   {

   }
   else
   {
     DeathFall = true;
   }



   if (DeathFall == true) 
   {
     Invoke("CheckIfFalling", 1.8f);

   }

And then CheckIfFalling function:

void CheckIfFalling()
    {
       if (DeathFall == true) 
       {
         Debug.Log ("Dead")
       }
       else
       {
         Debug.Log("Alive")
       }
 
    }

Doesen’t matter, it’s sloved

Do a raycast downward using out hit. the hit info has the distance the ray traveled before it hit a collider, that will give you enough info to determine if he has fallen off a cliff or just a step.
raycast hit - distance

As for the falling itself, you can detect this easily from Update(). in start do a downward ray, and store that distance in a global variable. in each update (or whatever detection rate you use) do a downward raycast and compare it to the stored distance. if it is greater than the stored distance it is a good indication they are falling. if it exceeds your initial falling threshold, then play the falling anim. if it exceeds the max fall theshold, then do your other anim or whatever.

using UnityEngine;

public class Falling : MonoBehaviour
{
    public float fallingThreshold = 1f;
    public float maxFallingThreshold = 20f;

    private float initialDistance = 0f;
    private RaycastHit hit;

    void Start()
    {
        var dist = 0f;
        GetHitDistance(out dist);
        initialDistance = dist;
    }
    bool GetHitDistance(out float distance)
    {
        distance = 0f;

        Ray downRay = new Ray(transform.position, -Vector3.up); // this is the downward ray
        if (Physics.Raycast(downRay, out hit))
        {
            distance = hit.distance;
            return true;
        }
        return false;
    }
    void Update()
    {
        var dist = 0f;
        if (GetHitDistance(out dist))
        {
            if (initialDistance < dist)
            {
                //Get relative distance
                var relDistance = dist - initialDistance;

                //Are we actually falling?
                if (relDistance > fallingThreshold)
                {
                    //How far are we falling
                    if (relDistance > maxFallingThreshold) Debug.Log("Fell off a cliff");
                    else Debug.Log("basic falling!");
                }
            }
        }
        else
        {
            Debug.Log("Infinite Fall");
        }
    }
}