How to make a variable greater the more time passes ?

Here when I press v to jump (so isGrounded = false ), my rigibody will fall at a constant rate (-10 when not grounded ), but I want the speed of the fall to gradually increase the more time passes. Is there a function or something that could help me achieve this. I’ve scratched my head for two hours and still can’t manage to do it. Could you help me please ?

using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    public Rigidbody rb;
    public float forwardForce = 2000f;
    public float sidewaysForce = 200f;
    private float belowLimit = -1f;
    public bool isGrounded = true;
    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void FixedUpdate()
    {
        rb.AddForce(0, 0, forwardForce * Time.deltaTime);

        if (Input.GetKey(KeyCode.Q))
        {
            rb.AddForce(-sidewaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
        }

        if (Input.GetKey(KeyCode.D))
        {
            rb.AddForce(sidewaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
        }

        if (Input.GetKey(KeyCode.V))
        {
            rb.AddTorque(200, 0, 0, ForceMode.Impulse);
            rb.AddForce(0, 100 * Time.deltaTime, 0, ForceMode.Impulse);

        }

        if (!isGrounded)
        {
            rb.AddForce(0, -10, 0);
        }


        if (rb.position.y < belowLimit)
        {
            FindObjectOfType<GameManager>().Endgame();
        }


    }

    private void OnCollisionStay(Collision collision)
    {
        if (collision.gameObject.CompareTag("Ground"))
        {
            isGrounded = true;
        }

    }

    private void OnCollisionExit(Collision collision)
    {
        isGrounded = false;
    }
}

“Here when I press v to jump (so isGrounded = false ), my rigibody will fall at a constant rate (-10 when not grounded ), but I want the speed of the fall to gradually increase the more time passes.”


Thats not how Unity or gravity works. Earths gravity (at ground level) works by increasing your velocity by 9.8 metres per second squared adjusting for surface area/ air resistance until you reach terminal velocity.


Unities engine does the same thing

If you need to change the drag of the object checkout the angulardrag and drag properties on the ridgidbody.

Yes ^^ Sorry, i made a mistake picking my words. I meant the constant gravitational decelaration, which is 10 m/s*s