Jump Distance

how can i make a frog jump same distance every time.

eksample.

i want the frog jump from position.z 0.0 to 2.0 and if i press the button it jump to 4.0

my problem is the i can make the frog change position but i want the jump effect (not just change position)

What you want is some kind of parabolic curve for when the frog jumps. If you know the target position, you can do something like this:

function JumpForward(targetPos : Vector3)
{
    var startPos : Vector3 = transform.position;
    var height : float = 0;
    var verticalVelocity : float = jumpPower;
    var curTime : float = 0;
    while(curTime < jumpTime)
    {
        height += verticalVelocity * Time.deltaTime;
        verticalVelocity = Mathf.Lerp(jumpPower, -jumpPower, curTime / jumpTime);
        var basePos : Vector3 = Vector3.Lerp(startPos, targetPos, curTime / jumpTime);
        var resultantPos : Vector3 = basePos + (Vector3.up * height);
        transform.position = resultantPos;
        curTime += Time.deltaTime;
        yield;
    }
}