예제 #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)));
 }