Different Jump Heights: Input.GetKey vs Pointer Down

Hi,

I am creating a very simple platformer and have noticed a very strange behavior when playing it on Android: while testing on PC, my obstacles were very easy to overcome but once on my phone they were almost impossible to beat.
For PC controls, I am using LeftArrow, RightArrow and Space. On Android I am using 3 UI elements and Pointer Down events.
I did some experiments and added an UI element to display the max height of my character after each jump and this confirmed my expectations: 2.218 on PC and 1.834 on Android (or on PC using the UI to jump)
If I set a multiplier of 1.145f on the UI jump, then the jump height is almost the same.
Why is the jump height different when it should be the same for both methods??

  if (Input.GetKey(KeyCode.Space))
    {
        if (onGround)
        {
            rb.velocity = new Vector2(rb.velocity.x, jumpheight);
            boink.Play();
        }
    }

    if (jump)
    {
        if (onGround)
        {
            rb.velocity = new Vector2(rb.velocity.x, jumpheight * 1.145f);
            boink.Play();
        }
        jump = false;
    }

hexagonius ·

use the Input.GetKeyDown
method to achieve the same effect.

→ closed

use the Input.GetKeyDown method to achieve the same effect.