Faster Velocity

Hi

I'm trying to make an object jump if you hit the up-key. I've done this with rigidbody.velocity and it works, but it jumps very slow. Here's my code:

function Update () {
        player.Translate(0,0,Time.deltaTime*SpeedForward);
        player.position.x = 0;
        player.rotation = Quaternion.identity;

        if (onGround) {
            if (Input.GetKey("up")) {jump();}
        }
}

function jump() {
        onGround = false;
        player.rigidbody.velocity = Vector3(0,12.5,0);
        yield WaitForSeconds(1);
        player.rigidbody.velocity = Vector3(0,-2,0);    
}

How can I increase the jump/sink-speed?

Kind Regards

As far as I know, Unity works ideally with a unit scale of 1 unit = 1 meter (see http://unity3d.com/support/documentation/ScriptReference/Rigidbody.html top of section 1; and http://unity3d.com/support/documentation/Components/class-Rigidbody.html section "Use the right size").

Larger objects will appear to fall slower than smaller objects (think real statue of liberty vs a souvenir statue of liberty), even though they are falling at the same speed. I think your problem here may be scale. At a velocity of 12.5 meters/second, your object definitely seems to be moving fast enough.

Yeah, I would like an answer for this as well. It’s slow for me.

Ok I did some testing as i needed something on the same lines, and thought the code may be of some use here:

void FixedUpdate () {
  StartCoroutine(Jump(20.0f));
}
    
//Add jump force for small amount of time
IEnumerator Jump(float upForce){
    
   this.rigidbody.constantForce.force = Vector3.up * upForce;
   yield return new WaitForSeconds(0.2f);
   this.rigidbody.constantForce.force = Vector3.zero;

}

its a simple solution that works well for testing, while finding better solution :wink: