Vector3.Lerp
transform.position = Vector3.Lerp(transform.position, target, Time.deltaTime * speed); // 第三个参数的值限制为[0,1],小于0即为0,大于1为1。当前帧移动的距离为:第三个参数 * 总距离,如第三个参数为0.5,一帧就是移动一半的距离。如果距离小于0.1,好像是默认一帧移动完
Vector3.Lerp
transform.position = Vector3.Lerp(transform.position, target, Time.deltaTime * speed); // 第三个参数的值限制为[0,1],小于0即为0,大于1为1。当前帧移动的距离为:第三个参数 * 总距离,如第三个参数为0.5,一帧就是移动一半的距离。如果距离小于0.1,好像是默认一帧移动完