Пример #1
0
 public Vector2 GetVelocity(float t)
 {
     return(parent.TransformPoint(Bezier.GetFirstDerivative(tailPoint, controlPoint, headPoint, t)) - parent.position);
 }
Пример #2
0
 public Vector2 GetClosestPoint(Vector2 point, out float t)
 {
     point = parent.InverseTransformPoint(point);
     return(parent.TransformPoint(Bezier.GetClosestPoint(tailPoint, controlPoint, headPoint, point, out t)));
 }
Пример #3
0
 public Vector2 GetPoint(float t)
 {
     return(parent.TransformPoint(Bezier.GetPoint(tailPoint, controlPoint, headPoint, t)));
 }