I want to apply force to my ship then as the key is released, slowly back it off. It’s a sidescrolling ship game if you get what I mean by it. So uparrow is pressed, it gets pushed up but after it’s let go, it slows down to a stop, doesn’t keep going, and isn’t instantaneous
Current state
function Update () {
if (Input.GetKey (KeyCode.UpArrow)){
rigidbody.AddForce (Vector3.up * 100);
}
}