Hello dear community,
I am new to the unity3d gameEngine and i am trying to learn basic c# scripting.
I got a basic move script and i was wondering how i can add a jump functionality.
This is what i have so far and i am trying to merge the script that i found on the unity scripting reference
public class Player : MonoBehaviour
{
public float movementSpeed = 10;
public float rotationSpeed = 60;
void Update()
{
float horizontal = Input.GetAxis("Horizontal") * rotationSpeed * Time.deltaTime;
transform.Rotate(0, horizontal, 0);
float vertical = Input.GetAxis("Vertical") * movementSpeed * Time.deltaTime;
transform.Translate(0, 0, vertical);
}
}
Thanks in advance