Lerp和SmoothDamp比较

 

Lerp更像是线性衰减,而SmoothDamp像是弧形衰减,两者都是由快而慢

其中SmoothDamp多用于相机跟随。但如果其他类型的插值,我个人觉的其实都差不多

 

SmoothDamp:

transform.position = Vector3.SmoothDamp(transform.position, target.position, ref velocity, smoothTime);

 

Lerp:

transform.position = Vector3.Lerp(transform.position, target.position, 0.1f);

 

http://www.cnblogs.com/hont/p/5186637.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
  • 2021-12-10
  • 2021-11-20
  • 2022-01-07
  • 2021-11-21
  • 2021-06-09
猜你喜欢
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
相关资源
相似解决方案