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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM