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()); }
public static Matrix4x4 GetEndTransform(this IAIPath path) => path.GetTransform(path.GetLength());