unity脚本_Mathf和Math c#

首先创建一个脚本

unity脚本_Mathf和Math c#_第1张图片

当我们要做一个值趋近于一个值变化时 可以用Mathf.Lerp(start,end,time);方法实现 比如物体跟随

unity脚本_Mathf和Math c#_第2张图片

你可能感兴趣的:(1024程序员节)