Exemple #1
0
        /// <summary>
        /// 获得指定进度下的运动位置和运动方向
        /// </summary>
        public bool GetPathPosAndMoveDir(float pathProgress, out Vector3 pos, out Vector3 moveDir)
        {
            if (MathTools.CatmullRomSpline(points, loop, pathProgress, out pos, out moveDir))
            {
                pos     = transform.TransformPoint(pos);
                moveDir = transform.TransformDirection(moveDir);
                return(true);
            }

            return(false);
        }