Add a smooth effect to a transform position
transform.position = Vector3.Lerp(startPos, endPos, Time.deltaTime * speed);