I am making a 2.5 game, and i want my character to jump. But when i jump, I dont know how to make it go back to the ground. Also, when i press play on Unity, it just instantly moves to the new position, with no animation.
Here is my code:
public float jump = 20f;
void Update () {
if (Input.GetKeyDown (KeyCode.Space)) {
transform.Translate (Vector3.up * jump * Time.deltaTime, Space.World);
}
}