Im new to game development and unity as a whole, I don't know how to add jumping to my player controls script. i copied the horizontal movement from another tutorial i found somewhere, heres the code:
public float moveSpeed = 10f;
public Vector2 jumpHeight;
// Start is called before the first frame update
void Start()
{
Debug.Log("Initialized");
}
// Update is called once per frame
void Update()
{
//Translate sprite based on Input.GetAxis("Horizontal") a/d input
transform.Translate(Input.GetAxis("Horizontal") * 15f * Time.deltaTime, 0f, 0f);
}
}