7532人加入学习
(77人评价)
Dotween API详解及动效插件(Unity 2017.3)

制作完成于2018-12-14

价格 免费

不要复制之前cube物体

挂载脚本lee,会跟着运动一起运动

=-=

 

/**路径动画—位置参数
         * DOPath局部   DoLocalPath
         * 实现可视化操作
         * 公有字段,保存点
         * public Transform[] PointList;
         *
         * 简便获取数组的参数
         * 1.位置  
         * 2.持续时间
         * 3.运动曲线
         *      PathType.Linear直线运动  
         *      PathType.CatmullRom 曲线运动
         *      
         * 4.LookAt朝向PathMode.Full3D
         * 参数
         * Ignord=0 会忽略lookAt
         * Full3D=1 常规的3D效果 相当于没有限制的lookAt
         * TopDown2D=2 朝向只能上下的改变
         * Sidescroller2D=3  朝向只能左右的改变
         *
         * 5.分辨率 50
         * 0-100 消耗性能逐渐高
         *
         * 6.路径颜色Color.blue
         * 默认白色
         *
         */
        //Vector3[] positons = PointList.Select(u=>u.position).ToArray();
        //Vector3[] positons = new Vector3[] { new Vector3(0,0,0), new Vector3(2, 0, 0), new Vector3(0, 0, -2), new Vector3(2, 0, -2) };
        //ositons[2] = new Vector3();

        var positons = PointList.Select(u => u.position).ToArray();
        transform.DOPath(positons, 2, PathType.CatmullRom,PathMode.Full3D,50,Color.red);

 

 

[展开全文]