how to add jumping unity with controller
public float jumpForce;
public float gravity;
Vector3 velocity;
public CharacterController controller;
void Update()
{
//this also add gravity
velocity.y += gravity * Time.deltaTime;
controller.Move(velocity * Time.deltaTime);
if(Input.GetKeyDown(KeyCode.Space))
{
velocity.y = Mathf.Sqrt(jumpForce * -2f * gravity);
}
}