float rate = .5f;
float maxScale = 1.2f;
float minScale = .8f;
float scale = (Mathf.Sin(Time.time * (rate * 2 * Mathf.PI)) + 1f)/2f;
scale = Mathf.Lerp (minScale, maxScale, scale);
transform.localScale = new Vector3(scale,scale,scale);
float rate = .5f;
float maxScale = 1.2f;
float minScale = .8f;
float scale = (Mathf.Sin(Time.time * (rate * 2 * Mathf.PI)) + 1f)/2f;
scale = Mathf.Lerp (minScale, maxScale, scale);
transform.localScale = new Vector3(scale,scale,scale);
本文标题:unity scale循环大小
本文链接:https://www.haomeiwen.com/subject/zzbxlttx.html
网友评论