纳金网
标题:
iTween 抛物线运动
[打印本页]
作者:
烟雨
时间:
2015-10-22 21:16
标题:
iTween 抛物线运动
iTween 抛物线运动
void Start()
{
Vector3[] paths = new Vector3[3];
paths[0] = gameObject.transform.position;//第一个点:起始位置.
paths[1]= gameObject.transform.position+transform.forward*1.3f+transform.up*3f;//第二个点:起始位置前方几米处上方几米的坐标.
paths[2]=gameObject.transform.position+transform.forward*2.3f;//终点:起始位置前方几米的位置.
iTween.MoveTo(gameObject,iTween.Hash("path",paths,"movetopath",true,"time",1.5f));//movetopath=false按点移动,=true按照点构成的曲线路径移动
}
复制代码
欢迎光临 纳金网 (http://go.narkii.com/club/)
Powered by Discuz! X2.5