Beispiel #1
0
        // Get the location of the path based on how far you have traveled to a initial relative point
        public static bool GetPointReltiveByLength(this PearlSpline path, out Vector3 result, float length, Vector3 initPosition)
        {
            if (path == null)
            {
                result = default;
                return(false);
            }

            bool    isFinish = path.GetPointByLength(out result, ref length);
            Vector3 initPath = path.EvaluatePosition(0);

            result = initPosition + (result - initPath);
            return(isFinish);
        }