Why is my SmoothDamp taking four times longer to finish than it should?

This takes 4.6 seconds to complete. I want it to take 1.0 seconds - like I put in the function.

cur, to, and vel are not altered anywhere.

What have I done wrong?

#pragma strict

var from : float;
var to : float = 10;
var time : float = 1;
private var vel : float;
private var cur : float;
private var amntTime : float;

function Start () {
	cur = from;
	vel = 0;
}

function Update () {
	amntTime += Time.deltaTime;
	cur = Mathf.SmoothDamp(cur,to,vel,time);

	if ( Mathf.Abs(cur-to) < 0.01 ) {
		Debug.Log("Took " + amntTime);
		gameObject.active = false;
	}
}

I was using deltaTime, which has the same results as this convoluted thing. Just trying to see if somehow the coroutine was getting the wrong deltaTime.

SmoothDamp looks like it uses Time.deltaTime internally or some other method of keeping the smoothing consistent over each frame. Try replacing “Time.time - lastTime” with something constant and it should work. Like putting a 1 should smooth it for one second. I could be wrong but I have used SmoothDamp before and noticed that putting Time.deltaTime in that parameter slot is pointless.