CharacterController jump:
if (controller.isGrounded &&
jumpAction.action.WasPressedThisFrame())
{
verticalVelocity = Mathf.Sqrt(
jumpHeight * -2f * gravity
);
}
Rigidbody jump:
if (isGrounded &&
jumpAction.action.WasPressedThisFrame())
{
rb.AddForce(
Vector3.up * jumpForce,
ForceMode.Impulse
);
}
Useful polish techniques: