I have a quick jump script here where when the user presses “up” the ball translates up. The problem is, when it is held, it continues to move the character upwards. Does anyone know a clever way to jump once, then stop adding force. If you give me pseudoscript I could probably figure it out for myself. Thanks a bunch.
var jumpSpeed : float = 0;
function Update () {
if (Input.GetKey ("up")) {
rigidbody.velocity = transform.up * jumpSpeed;
}
}