Lerp更像是线性衰减,而SmoothDamp像是弧形衰减,两者都是由快而慢
单从视觉效果来说不觉得哪个好,个人觉得如果做相机跟随其实都可以
SmoothDamp:
transform.position = Vector3.SmoothDamp(transform.position, target.position, ref velocity, smoothTime);
Lerp:
transform.position = Vector3.Lerp(transform.position, target.position, 0.1f);
时间: 2024-11-10 14:07:38