johnatm / itween

Automatically exported from code.google.com/p/itween
1 stars 2 forks source link

No issue just a helpfull function #55

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, sorry to bug you but I thought you might find this useful. I had to make an 
animation playback controller using iTween. But I needed a way of scrubbing the 
animation back and forth so I added this

    // sets the running time from a normalized value
    // 0 = start
    // 1 = end
    // 0.5 = halfway etc.

    public void SetRunningTime(float num)
    {           
        runningTime = time * Mathf.Clamp01(num);    
    }

Thought you might find some use for it.

Matt Ditton (mattditton@gmail.com)

Original issue reported on code.google.com by mattdit...@gmail.com on 23 Jan 2011 at 7:05