private void Update() { if (affectingField == null) { return; } if (!affectingField.IsActive) { affectingField = null; return; } float ratio = (Time.time - timeSwitched) / lerpTime; body.velocity = Vector2.Lerp(originalVelocity, affectingField.GetFieldVelocity(), ratio); }