예제 #1
0
 protected override Vector3 GetInterpolatedPosition(CurveData cd, float delta)
 {
     if (curves.Count == 0)
     {
         return(transform.position);
     }
     else
     {
         return(base.GetInterpolatedPosition(curves[GetPath()], GetDelta()));
     }
 }
예제 #2
0
 protected virtual Vector3 GetInterpolatedPosition(CurveData cd, float delta)
 => Vector3.LerpUnclamped(cd.positionA, cd.positionB, cd.curve?.Evaluate(delta) ?? 0f);
예제 #3
0
 protected Vector3 SetInterpolatedPosition(CurveData cd)
 => SetPosition(GetInterpolatedPosition(cd, GetDelta()));