public void Update(InterpolationMode interpolation, UnityEvent onStep) { float supportLegWTarget = isSupportLeg ? 1f : 0f; supportLegW = Mathf.SmoothDamp(supportLegW, supportLegWTarget, ref supportLegWV, 0.2f); if (!isStepping) { return; } stepProgress = Mathf.MoveTowards(stepProgress, 1f, Time.deltaTime * stepSpeed); if (stepProgress >= 1f) { onStep.Invoke(); } float stepProgressSmooth = Interp.Float(stepProgress, interpolation); position = Vector3.Lerp(stepFrom, stepTo, stepProgressSmooth); rotation = Quaternion.Lerp(stepFromRot, stepToRot, stepProgressSmooth); }
// Token: 0x0600098C RID: 2444 RVA: 0x000434F0 File Offset: 0x000418F0 public static Vector3 V3(Vector3 v1, Vector3 v2, float t, InterpolationMode mode) { float num = Interp.Float(t, mode); return((1f - num) * v1 + num * v2); }