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
  how to make fast moving controller go all the way to linear points?(curvy8) hawken 7 12 06-06-2023, 09:47 AM
Last Post: _Aka_
Brick Extending Curvy to make a Hallway editor. JacobSL 5 396 02-13-2023, 09:29 AM
Last Post: _Aka_
  Way to make gameobject follow splines 'human-ly'? yun844 3 11 01-17-2023, 10:18 AM
Last Post: _Aka_
  How to make mesh appear only on curves? Vancete 2 18 01-09-2023, 09:10 AM
Last Post: _Aka_

Forum Jump: