When my character jumps, he does a little bounce before doing the jump Unity 2D,

I am still very new to Unity, so this might be a dumb question, but I have spent some time trying to create a 2D Character controller from the ground up for a school project I’m working on,
and the movement works just fine, but whenever it comes to jumping, my character does a small bounce before jumping,

This is a gif of what happens whenever my character jumps:
(https://i.gyazo.com/735264eaeb46b62ae44937cf5bc07a9a.mp4)

My character movement script is the following:

public class PlayerMovement : MonoBehaviour
{
    public Rigidbody2D rigidbody;
    public BoxCollider2D collider2D;
    [SerializeField] LayerMask groundLayer;

    public float JumpStrenght;
    public float SideStrenght;

    float SideMovement;
    float UpwardsMovement;


    void Update() {
        SideMovement = Input.GetAxis("Horizontal") * SideStrenght;
        UpwardsMovement = Input.GetAxis("Vertical") * JumpStrenght;
    }
    private void FixedUpdate() {
        MoveAround(SideMovement);
        JumpAround(UpwardsMovement);
    }


    void MoveAround(float xAxis) {
        rigidbody.velocity = new Vector2(xAxis, rigidbody.velocity.y);
    }

    void JumpAround(float yAxis) {
        if (isGrounded() && yAxis != 0) {
            Debug.Log("got to jump");
            rigidbody.velocity = new Vector2(rigidbody.velocity.x, yAxis + 1); 
        }
    }

    bool isGrounded() {

        RaycastHit2D hit2D = Physics2D.BoxCast(collider2D.bounds.center, collider2D.bounds.size, 0f, new Vector2(0, -1), 0.10f, groundLayer);

        if (hit2D.collider != null) {
            return true;
        }
        else {
            return false;
        }
    }
}

I use a BoxCast to know wheter or not my character is grounded, and that works out alright, but the jump is the only thing that has gotten me scrambling my brains over. I’d really appreciate some help

I think that I see what the problem is. With Input.GetAxis(), the value goes from 0 to 1 or -1 over a set period of time, and not just one frame. However, your character jumps during the first frame when the jump key is pressed, when the Vertical axis’ value is only something like 0.1785, for example. Thus, at first, your character is only jumping 0.1785x the regular jumpheight. But by the time your character reaches the ground, the Vertical axis’ value up to 1, and he does a regular jump. (I hope that I explained this well enough.)

To fix this, I would jump using a button rather than an axis (Unity automatically has a “Jump” button set up in the Input Settings.) In your script, I would write this:

bool isTryingToJump;

void Update()
{
SideMovement = Input.GetAxis("Horizontal") * SideStrenght;
isTryingToJump = Input.GetButtonDown("Jump");
}

And:

// The yAxis parameter for this function isn't needed anymore
void JumpAround() {
         if (isGrounded() &&  isTryingToJump) {
             Debug.Log("got to jump");
             rigidbody.velocity = new Vector2(rigidbody.velocity.x, jumpStrenght); 
         }
     }