Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generating Paths at Runtime
#1
I'm trying to upgrade my project to Curvy 2.0. I used the previous version of Curvy to generate a variable number of SplinePathMeshBuilders at runtime. I had a GameObject with a CurvySpline and a SplinePathMeshBuilder as a prefab, and I created an instance for each path I needed and then manipulated the points to match my scene. From reading the docs, I understand that I need to use the CurvyGenerator now.

Question 1: Do I create a CurvyGenerator object at runtime for every path I want? Or can I generate multiple paths from one?
Question 2: How do I create a flat extrusion? I'm working in 2D so I don't need a tube, and I've tried inserting a TRS Shape node after my Input Spline Shape to rotate it to flat but my results are not as expected. I started with the "ShapeExtrusion" template which seemed like a good start, but I can't seem to draw a textured 2D path. Image attached, with my Curvy 1 path on the left, and Curvy2 path on the right.


Attached Files Image(s)
   
Reply
#2
I was able to get the 2D working by giving my shape 0 width. But I still want to know if I should be creating a CurvyGenerator for each one or if there is a better method.
Reply
#3
There's not much overhead to a CG, so having three CG's extruding a path or having one extruding three paths doesn't make a big difference. Combining makes sense if they share same source splines, though.
Reply
#4
They don't share source splines, so I'll make one for each path. Thanks!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Assigning "OnControlPointReached" and "OnEndReached" values during runtime? TenaciousLibbs 2 2,190 02-18-2021, 01:12 PM
Last Post: PretzelStudios
  Runtime Optimization mirts 1 190 02-11-2021, 07:37 PM
Last Post: _Aka_
  Subdivide in runtime? Spectra 3 596 10-07-2020, 08:28 AM
Last Post: p30better
  Frequent runtime updates of Curvy Generator for simulating plant growth using Splines h4ck3rd4wg 6 1,087 10-02-2020, 07:57 PM
Last Post: _Aka_

Forum Jump: