Gravity messing with horizontal momentum

Hello all,

When my player object is falling and I apply no friction, gravity causes it to slow down drastically.
As far as I understand, gravity shouldn’t do this right ?

I have the following code to move my object:

        float xInputDirection = Input.GetAxis("Horizontal");
        Vector2 runVector = new Vector2(xInputDirection, 0f);

        playerRigidBody.AddForce(runVector * runPower, ForceMode2D.Force);

When I apply friction, it causes my player object to fall slower, and increases the horizontal momentum…

It’s also worth noting Update() gives better results than Fixedupdate() which is what I want to avoid using. Does anyone have any idea why this occurs ?

Thanks in advance.

Try this:

Vector2 runVector = new Vector2(xInputDirection,  playerRigidBody.velocity.y);

You were setting y velocity to zero (I’m guessing the code was inside Update/FixedUpdate).