Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to create objects by curved path?

Discussion in 'Scripting' started by GooDLo, Aug 12, 2014.

  1. GooDLo

    GooDLo

    Joined:
    Jun 6, 2014
    Posts:
    7
    Any idea how it could develop the plot lines? when the dashed line curve bends. The route I have developed, but not how to make curved lines bent according to the direction of the path



    Thanks!
     
  2. Patico

    Patico

    Joined:
    May 21, 2013
    Posts:
    886
    You can make a mesh at runtime.
     
  3. Kogar

    Kogar

    Joined:
    Jun 27, 2013
    Posts:
    80
    If you have already got a path it should not be hard to add objects which are facing the direction of the path. Just get the position and direction in small intervalls and place your object accordingly.
    There are 2 good tutorials that i am currently looking into:
    http://kylehalladay.com/all/blog/2014/03/30/Placing-Objects-On-A-Spline.html
    http://catlikecoding.com/unity/tutorials/curves-and-splines/

    If you want to deform your mesh to follow your path that seems to be harder to do. At least i haven't found a good tutorial yet. If you have got money to spare one of the two addons can do the work
    SplineBend
    Mega-Fiers
     
    Magiichan and GooDLo like this.
  4. GooDLo

    GooDLo

    Joined:
    Jun 6, 2014
    Posts:
    7
    Wow! just what I needed, thank you very much;)