Hello,
Depending on the effect you want you might not which to use the following:
Position.Y += UpwardVelocity * Deltatime;
//Apply Gravity to UpwardVelocity so Link falls back down
UpwardVelocity -= Gravity * Deltatime;
Because when you multiply the upward velocity by the delta time you forget the factor for acceleration which is 0.5 as shown in your first post.
Lets push your model a bit:
You have Position.Y += UpwardVeolicty * Deltatime;
So, deltaYPosition = UpwardVeolicty * DeltaTime; (just some renaming here)
UpwardVelocity = (oldSpeed - Gravity * DeltaTime );
which gives
deltaYPosition = ( oldSpeed - Gravity * DeltaTime) * DeltatTime; (even if it is only on the next cycle that this applies)
so deltaYPosition = oldSpeed * DeltatTime - Gravity * DeltaTime * DeltaTime;
Here you are squaring DeltaTime which has for consequences to nearly ignore gravity since milliseconds * milliseconds gives out microseconds.
It is easier to use a jumpTime as you had in your first example.
(general DeltaPosition equation would be: DeltaPosition = InitialSpeed * DeltaTime + 0.5 * g * DeltaTime* (old Time + newTime)
where g is -9.81
Hope it helps you realize a correct jump function
Regards,
Chryso