The Mario Jump?

Hi this has probably been over asked but i cant find any information on it, and i was wondering the best way to do this inside unity.

when mario jumps the jumps are prolonged till the button is released

Things i am curious about are:

whether or not to use physics?

if using physics what is the "standard" (if any) way to do this? is it changing the mass during the jump? the power of the jump? or increasing the gravity when the button has been released.



One way to do it (yes, using physics), would be to add to the player's velocity when the jump button is pressed (add to the Y-value of it), and continue to add to it for maybe a half a second or a second while the button is pressed. So if it was only pressed lightly, jump normally (say, +5 velocity), but if the button was held down for a semi-extended period of time, keep adding very small values to the velocity, as well, say 0.05 velocity per update, until the "maximum jump time" is reached (the longest they can hold the button for the jump to be longer), maybe 0.5 to 1 seconds.

hey im making the same mario jump and need to make it jump a lil hgher if i hold the up button. so would u please show me your jump script ? tnx in advance for your help :wink: