How do I create objects in between two points with an offset?
<p>I am wondering on how to do this
in Pic1 SEG3.For example, I know how to do whats in SEG1/SEG2 with this <code>Vector3 position = controlPoints[i].position + j *(controlPoints[i + 1].position - controlPoints[i].position) / segCount;</code>(<em>For more about the code visit <a href="http://answers.unity3d.com/questions/1226054/how-do-i-instantiate-gameobjects-in-between-multip.html" rel="nofollow noreferrer">here</a> its an old question I asked about dividing between two points</em>),</p>

<p>but I want to know how to do this in SEG3(which we'll come around in second). As you can see in SEG2 when I move it, the subPoints will always stay in the center, but I want to know how to move it like in SEG3 so that sub points stay specific distance(int distanceCP) away from the controlPoints, would anyone know how to do this??</p>

<p>Pic1
<img src="https://i.stack.imgur.com/yepMZ.png" alt=""></p>

<hr>

<p><strong>Here is the code that does SEG1/SEG2.</strong></p>

<pre><code>public class Points : MonoBehaviour
  {
      public Transform[] points;
      public GameObject GameObj;
      public float GameObjectAmount = 2;
      void Start()
      {
          duplicateObject(GameObj, (int) GameObjectAmount);
      }
      public void duplicateObject(GameObject original, int howmany)
      {
          howmany++;
          for (int i = 0; i &lt; points.Length-1; i++)
          {
              for (int j = 1; j &lt; howmany; j++)
              {
                  Vector3 position = points[i].position + j * (points[i + 1].position - points[i].position) / howmany;
                  Instantiate(original, position, Quaternion.identity);
              }
          }
      }
  }
</code></pre>