Bounce with speed

hey i write a bounce code

`#pragma strict

private var DirectionX:int;

private var YFactor:float;

private var XFactor:float;

function Start ()

{

        YFactor = 9;

        XFactor = 0.6f * DirectionX;                     //DirectionX =-1/1

}

function FixedUpdate()

{

}

function Update ()

{

}

function OnCollisionEnter(collisionInfo:Collision)

{

if(collisionInfo.transform.tag == "Base")

{

    this.rigidbody.AddForce(Vector3.up*YFactor,ForceMode.Impulse);

    this.rigidbody.AddForce(Vector3.right*XFactor,ForceMode.VelocityChange);

}

else if(collisionInfo.transform.tag == "Wall")

{

    XFactor *= -1;

    this.rigidbody.AddForce(Vector3.right*XFactor*2,ForceMode.VelocityChange);

}

}`
now if i attach this script to an object that will start bounce(without bounce material) but with a constant speed.
so my question is if i need that one ball bounce faster than the other one i have to set a speed for it but don’t understand where,changing in “YFactor” will only increase its height of bounce .plz any solution .

You need to set an initial velocity. It’s not pretty but it works.

This gives you a control that will let you set the x, y
and z components. For example, to set the initial velocity
for gravity you would set the y component to -10. Most
other velocities would be set with a positive value in
the proper direction.

`
public var initialVelocity : Vector3;

    function Start() {
            transform.ridigbody.velocity = initialVelocity;
    }

`