Flick Determines Velocity...

I am trying to set up a 3D ragdoll flicking game as test app. In this app I need to know how to set up a script where your flick determines your velocity (like in a flick basketball game).

I did some research and found this: http://answers.unity3d.com/questions/7258/iphone-flick-shooting

But time determination is lame. Does anybody know how to set up a professional script? That would be much appreciated.

Try something like this that updates in real time. It takes the first tap and measures the change in position since the last frame.

function Update () {

     var i : int = iPhoneInput.touchCount; 

     if(i > 0) {//check to make sure we have at least 1 touch

        var touch : iPhoneTouch = iPhoneInput.GetTouch(0); //Get the first touch

        var delta : float = touch.deltaPosition.magnitude; //the magnitude of 
        //the change in that touch's position.  Read this value for your

        delta /= Time.deltaTime; //the input is in pixels per second;
        //or take this line out and you have pixels per frame, but frames are
        // less consistent, but over a second, you will gather the actual pixels 
        //per second.

P.S. I didn't check this code so there may be a typo or two.

Hi im new to scripting and i like the sound of this and would help me a great deal but I have applied this to a gameobject and the camera but the script does’t seem to do anything for me. All I want to be able to do is roll a ball to a character and this seems to be really hard to find out how to do.

Many thanks.