I want to move an object towards the destination elastically. Currently I am using Vector3.Lerp it working to move the object, start with high speed and reached at destination with low speed but missing elastic effects.
float i = 50, t = 0;
while (t < 1)
{
t += Time.deltaTime / i;
transform.position = Vector3.Lerp(transform.position, newPostionAtDistance, t);
transform.LookAt(targetFollow.transform);
if (transform.position.ToString() == newPostionAtDistance.ToString())
{
//StartCoroutine(CamElasticMoveBackEffetcts());
Debug.LogWarning("Object reached to the point.");
yield break;
}
smoothTime += Time.deltaTime;
yield return 0;
i++;
}

