Exemple #1
0
        public static float GetDistanceFromLoftPath(this IAIPath path, float loftpathDistance)
        {
            var nS = path.GetStartPathOffset();
            var nE = path.GetEndPathOffset();

            //n = (nE - nS) * t + nS;
            //(nE - nS) * t = n - nS
            var t = (loftpathDistance - nS) / (nE - nS);


            return(t * path.GetLength());
        }
Exemple #2
0
 public static Matrix4x4 GetEndTransform(this IAIPath path) => path.GetTransform(path.GetLength());