Does SmoothDamp reach target?

This is rather a yes or no question but I would appreciate details. I’m wondering if Mathf.SmoothDamp and Vector3.SmoothDamp DO really reach their targets or just aproach to the target but never really reach it like Lerp. Also, if this is the case, what tricks will one use to get it to reach the target?

SmoothDamp is eventually reaching the target, but since the amount of adjustment is always smaller than what it takes to each it, or will only happen due to floating point precision.
You use it rather like a towrope, where it’s not important to each any target.

Here’s how I’m currently using Vector2.SmoothDamp(), which may not be perfectly correct, but it does seem to do the job. I’ve written a generic smoother:

struct Smoothed<T> {
    public T value;
    public T velocity;
    public delegate T smooth_t(T value, T targetValue, ref T velocity);
    static public smooth_t smoother;

    public void Smooth(T targetValue) {
        value = smoother(value, targetValue, ref velocity);
    }
}

Since it has a delegate, you have to fill it in for the type you’re trying to smooth:

Smoothed<Vector2>.smoother = (Vector2 value, Vector2 targetValue, ref Vector2 velocity) => {
    value = Vector2.SmoothDamp(value, targetValue, ref velocity, 0.2f, Mathf.Infinity, Time.fixedDeltaTime);
    return velocity.sqrMagnitude <= 0.00001f ? targetValue : value;
};

I’m passing Time.fixedDeltaTime, since I’m smoothing values observed from FixedUpdate() like this:

public Vector2 position;
private Smoothed<Vector2> smoothPosition;

private void FixedUpdate() {
    if (smoothPosition.value != position) {
        smoothPosition.Smooth(position);
        if (smoothPosition.value == position) {
            Debug.Log("smoothPosition == position");
        }
    }
}

As you can see, when the smoother delegate sees the velocity go nearly to zero, it finishes by assigning the target value to the value, so my code can reliably do an exact comparison with the target value. A better, but maybe more expensive test would be to finish when the Euclidean distance between the current and target values is nearly 0. In practice, this seems to work fine.