private void MoveAlongCurrentTrajectory() { progress = currentTrajectory.CalculateTByLength(progress, speed * Time.deltaTime); if (progress <= 1f) { transform.position = currentTrajectory.Calculate(progress); transform.forward = currentTrajectory.CalculateForward(progress); } }