Not frame rate independent

Hello,
I have this code in my Update() loop. I initialize Velocity with .2… When frame rate changes, I do not get the same jump height… Any idea of why this is not framerate dependent?
Thanks!


function Jump()
{
MyTransform.position.y+=Time.deltaTime*Velocity;
Velocity-=0.2;
if (MyTransform.position.y<0.184927)
{
MyTransform.position.y=0.184927;
DoJump=false;
}
}

“Velocity -= 0.2;” is not frame-rate independent.

–Eric

Move your objects by multiplying a direction vector with Time.deltaTime (and a speed int or float if you so desire).

var speed = 5;
transform.Translate(Vector3.up * Time.deltaTime *speed);

Thanks for the help!
This worked:

transform.Translate(Vector3.up * Time.deltaTime Velocity);
Velocity-=6
Time.deltaTime;

With Velocity initialized at a fixed value, in this case 2.0