title: Spawning items at sides of a spline
body: <p>I have just done the Curves and Splines Tutorials from the catlikecoding.com website (<a href="http://catlikecoding.com/unity/tutorials/curves-and-splines/" rel="nofollow">http://catlikecoding.com/unity/tutorials/curves-and-splines/</a>) and after finishing it I came up with an idea. I would like to spawn the items from the SplineDecorator at the same distance from the spline at both sides of the spline. I have tried duplicating the for loop and instantiating the newItem twice but at different position but it doenst work as I want to. Here's the Spline Decorator script that takes a spline and then Instantiate some items along the its path</p>
  
  <pre><code>using UnityEngine;
  
  public class SplineDecorator : MonoBehaviour
  {
      public BezierSpline spline;
      public int frequency;
      public float distanceBetweenItems;
      public bool lookForward;
      public Transform[] items;
  
      private void Awake()
      {
          if (frequency &lt;= 0 || items == null || items.Length == 0)
          {
              return;
          }
  
          float stepSize = 1f / (frequency * items.Length);
  
          for (int p = 0, f = 0; f &lt; frequency; f++)
          {
              for (int i = 0; i &lt; items.Length; i++, p++)
              {
                  Transform item = Instantiate(items[i]) as Transform;
                  Vector3 position = spline.GetPoint(p * stepSize);
  
                  item.transform.localPosition = new Vector3(position.x + distanceBetweenItems, position.y, position.z);
  
                  if (lookForward)
                  {
                      item.transform.LookAt(position + spline.GetDirection(p * stepSize));
                  }
  
                  item.transform.parent = transform;
              }
          }
      }
  }
  </code></pre>