Ejemplo n.º 1
0
            public static Vector3 Lerp(BezierCurveQuadV3D curve, float time)
            {
                var posOne = Lerps.Lerp(curve.StartPos, curve.MidPos, time);
                var posTwo = Lerps.Lerp(curve.MidPos, curve.EndPos, time);

                return(posOne + ((posTwo - posOne) * time));
            }
Ejemplo n.º 2
0
 public static void DrawPath(BezierCurveQuadV3D curve, float resolution = 0.1f)
 {
     for (float i = 0; i < 1f; i += resolution)
     {
         Gizmos.DrawLine(Lerps.BezierLerp.Lerp(curve, i), Lerps.BezierLerp.Lerp(curve, i + resolution));
     }
 }
Ejemplo n.º 3
0
 public static void DrawPointsPath(BezierCurveQuadV3D curve)
 {
     Gizmos.DrawLine(curve.StartPos, curve.MidPos);
     Gizmos.DrawLine(curve.MidPos, curve.EndPos);
 }