Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make dashed lines?
#1
Hi,

1. Is it possible to make dashed lines like there are in the middle of roads with the curvy-tool?
2. Will it be possible to make the curvy dashed lines according to the curves of the road?
3. How is it possible?
4. Will it be possible to generate a mesh for each dash?

Thanks in advance!
Reply
#2
Hi,
1. and 2. Yes, and you can see that done in example scene 21_CGExtrusion, which is called "Move object: Follow a Curvy generated volume" in the WebGL demo.
3. Have a mesh extrusion following the spline, and then set the dashed line in the texture applied on the mesh. This is done via the Curvy Generator feature.
4. If you want to generate meshes for dashes instead of having them as a texture, you can do that too, also through the Curvy Generator, by extruding a flat mesh. Also you can use the Curvy Line Renderer to generate a flat mesh. You can see that in example scene 04_PaintSpline, which is called ""Move object: Follow a dynamic spline" in the WebGL demo.
Is everything clear?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
(08-12-2020, 06:00 PM)_Aka_ Wrote: Hi,
1. and 2. Yes, and you can see that done in example scene 21_CGExtrusion, which is called "Move object: Follow a Curvy generated volume" in the WebGL demo.
3. Have a mesh extrusion following the spline, and then set the dashed line in the texture applied on the mesh. This is done via the Curvy Generator feature.
4. If you want to generate meshes for dashes instead of having them as a texture, you can do that too, also through the Curvy Generator, by extruding a flash mesh. Also you can use the Curvy Line Renderer to generate a flat mesh. You can see that in example scene 04_PaintSpline, which is called ""Move object: Follow a dynamic spline" in the WebGL demo.
Is everything clear?

Hi,

thank you very much. 4. is working - made with the generator tool. - Now I would like to use the API do make a dashed line with script:
I started generating the a spline:
CurvySpline _spline =  CurvySpline.Create();
        _spline.Add(new Vector3(0, 10, 0));
        _spline.Add(new Vector3(10, 20, 0));
        _spline.Add(new Vector3(10, 30, 0));


1. Do I need the same steps like in the generator now in code to create the dashes?
2. Do you have a sample code to:
2.1 Generate the 2D/Shape Rectangle ?
2.2 Shape extrusion for every dash for a certain Range?
2.3 Create a volume Mesh for each dash?
2.4 Create a Mesh for each Dash?


Thanks in advance!
Reply
#4
1. Yes. Except for some cases, the names of the fields displayed in the module's UI are the same as the related members in the module's class.
2. Look at InfiniteTrack.buildGenerator. Also, the API documentation should have everything you need.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Mesh Lines - Horizontal and Vertical Edges Krypton 14 158 09-23-2020, 02:16 AM
Last Post: Krypton
  Make GameObject Face towards Spline Path linkinballzpokemon 5 445 07-14-2020, 08:27 PM
Last Post: _Aka_
  make "GetCurrentControlPoint" in SplineController more accessable VampirasuGameStudio 2 892 04-19-2020, 02:03 PM
Last Post: _Aka_
  Make connection between 2 control points dazz777 11 2,412 04-17-2020, 01:37 PM
Last Post: _Aka_

Forum Jump: