hello there!
I am working on a 2D infinite sidescroller and right now the jump is very floaty. I need the jump to last longer if the tap is held, and vice cersa if it is just a tap, but also, for it not to feel too floaty. Right now I am using a vector3 to handle the jumps such as:
rigidbody.velocity = new Vector3(velocity, 7, 0);
That will keeep me at my current set velocity and jump me 7 units in the air. Only problem is that it just feels so floaty.
Any help with this?
How are you handling inputs? Are you using events? Or an Update function?
If it feels “floaty,” then that indicates that your gravity is too light. Increase the gravity, and then if your jumps are now too short, increase the initial velocity to compensate.
As for more Mario-style control of how high you jump, you need to either reduce or counteract gravity for as long as the button is held down. (Many games keep track of whether you’ve released the button on the current jump, so that once you’ve released it, pressing it again before you land has no effect.)