rigidbody.AddForce jump, different heights each time

Hello, I would think that my code would work fine for jumps, but each time I jump the height is different. It changes with x velocity for some reason, is there some way to make it consistent? could it have something to do with the Delta time?

relevant code:

function Update () {

animTimer++;

rigidbody.AddForce(Input.GetAxis("Horizontal") * horizontalSpeed * Time.deltaTime * 60,0,0);
rigidbody.velocity.x = Mathf.Clamp(rigidbody.velocity.x,-6,6);

if (Input.GetKeyDown(KeyCode.UpArrow) && isGrounded)
	{
		rigidbody.AddForce(0,jumpSpeed * Time.deltaTime * 60,0);
	}

			if (animTimer >= animSpeed)
				{
					frame++;
					animTimer = 0;
				}
				
if (Input.GetAxis("Horizontal") < 0) //if I'm pressing right
	{
	lastKeyPressed = "left";
		if (isGrounded)
				{
		animLayer = 0;
				}
		else
				{
		animLayer = 4;
				}
		
	}
if (Input.GetAxis("Horizontal") > 0) //if I'm pressing right
	{
	lastKeyPressed = "right";
		if (isGrounded)
			{
	animLayer = 1;
			}
		else
			{
	animLayer = 5;
			}
		
	}

if (!Input.GetAxis("Horizontal") && isGrounded) //if I'm pressing right
	{
		if (lastKeyPressed == "right")
			{
				animLayer = 2;
			}
		if (lastKeyPressed == "left")
			{
				animLayer = 3;
			}
	animTimer = 0;
	frame = 0;
	}

	rigidbody.velocity.x = rigidbody.velocity.x * friction;
		
		renderer.material.mainTextureOffset = Vector2(xOffset * frame, yOffset *animLayer);
}

function OnCollisionStay()
	{
		isGrounded = true;
	}
	
function OnCollisionExit()
	{
		isGrounded = false;
	}

You dont need deltaTime in jump. It is not continuous operation, you just add jump force once. If for some reason deltaTime is huge (lets say huge explosion is happening and framerate dropped significally), you would jump much higher.

Just delete deltaTime in jump and set jump force to suit your needs.


EDIT: This is why you should do PHYSICS stuff in FixedUpdate rather than Update. Your code would work perfectly there (even though deltaTime and jump isnt good idea, unless you maybe had thrusters on your feet) as that is asynchronously called 50 times per second. FixedUpdate was made for this.