Version: 2017.3
public static float SmoothDamp (float current, float target, ref float currentVelocity, float smoothTime, float maxSpeed= Mathf.Infinity, float deltaTime= Time.deltaTime);

Parámetros

current La posición actual.
target La posición que intentamos alcanzar.
currentVelocity La velocidad actual, este valor es modificado por la función cada vez que la llame.
smoothTime Aproximadamente el tiempo que tardará en alcanzar el objetivo. Un valor menor alcanzará el objetivo más rápidamente.
maxSpeed Opcionalmente le permite fijar la velocidad máxima.
deltaTime El tiempo transcurrido desde la última llamada a esta función. Por defecto Time.deltaTime.

Descripción

Gradualmente cambia un valor hacia una meta deseada con el tiempo.

The value is smoothed by some spring-damper like function, which will never overshoot. The function can be used to smooth any kind of value, positions, colors, scalars.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Transform target; public float smoothTime = 0.3F; private float yVelocity = 0.0F; void Update() { float newPosition = Mathf.SmoothDamp(transform.position.y, target.position.y, ref yVelocity, smoothTime); transform.position = new Vector3(transform.position.x, newPosition, transform.position.z); } }