How to get the same jump height each time

I’ve been trying to make a 2.5D game in Unity and I need the characters to jump similar to characters in BlazBlue. I’ve been trying to make it so that no matter the direction of the jump that the jump always reaches the same height:

I’ve been using rigidbodies that have everything except their x and y positions frozen and have apply gravity checked whenever I change the y velocity of the rigidbody. The problem is that changing the jump force makes the jump heights really inconsistent and sometimes doesn’t really make much change at all:

void Jump() {
	if (Input.GetKeyDown(moveRight)) {
		Vector3 vel = rigidbody.velocity;
		vel.y = jumpHeight * jumpHeight;
		rigidbody.velocity = vel;
		isFalling = true; 
		airAction--;
	}
	if (Input.GetKeyDown(moveLeft)) {
		Vector3 vel = rigidbody.velocity;
		vel.y = jumpHeight * jumpHeight;
		rigidbody.velocity = vel;
		isFalling = true; 
		airAction--;
	} else {
		Vector3 vel = rigidbody.velocity;
		vel.y = jumpHeight;
		rigidbody.velocity = vel;
		//rigidbody.AddRelativeForce (transform.up * jumpHeight, ForceMode.Force);
		isFalling = true; 
		airAction--;
	}
}

I’ve tried applying force already and using CharacterControllers seems to only make it worse. Is there any way I can acheive this effect?

Hello, i think i might have the answer, i asked this same question a couple of days ago and got a brilliant reply from a guy, here is the answer page:

If you have any questions then ask the guy who answered the question. :smiley:

For one, you’re setting vel.y to different things. When moving it’s jumpHeight^2, but when not moving it’s just jumpHeight.

Also double-check that the function isn’t accidentally getting called multiple times. It could accidentally be checking that ground is under the character’s feet, even though the character is moving away from it.