rigidbody falls slow as im jumping

Hello. I’m using a rigidbody 3d for my third person game,but there’s a small problem. The setup was successful,but every time jump while moving, the player falls very slowly. But when the player does not move while jumping, the player falls normally. What can I do to prevent this problem? If you need code or project, please let me know.

I’m assuming that in your script, when you move, you set your rigidbody’s velocity. The problem is that gravity also changes the velocity, but only on the y axis. So you wouldn’t want to interfere with the y axis. Instead of having:

Rigidbody.velocity = dir;

(dir being the Vector3 of the direction you want)
You should instead have:

Rigidbody.velocity = new Vector3(dir.x, rb.velocity.y, dir.z);

This instead only changes the velocity on the axes that you want, because it sets x and z to the dir, but y to whatever the velocity’s current y is.
If it’s a 2D project, just change the wherever it says Vector3 to Vector2 and get rid of dir.z.