Rigid body speed not increasing.

I’ve got a simple scene set up with a ball with a rigid body attached. When the ball rolls down a slope the speed stays at a constant and doesn’t increase and pick up speed over time as it rolls as you assume it would. This is the only piece of code I have attached to it which simply moves it forward.

if(Input.GetKey("w")){

		rigidbody.AddForce(Vector3.forward * 10);

}

Is there a simple answer to how to get it to increase in speed based on the enviroment.

You shouldn’t even have to do that. The ball should roll down the slope as soon as you just have a rigidbody attached to it. I don’t know why it don’t work like that, but to get that code working, you should place it in the update method, like this:

void Update()
{
    if(Input.GetKey(KeyCode.W))
    {
        rigidbody.AddForce(0, 0, 10);
    }
}

That’s it. It should work! Good luck!

/TheDDestroyer12