Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noob Question
#4
(09-03-2021, 07:06 PM)Wyldhunt Wrote: An example should be perfect. Thanks, @_Aka_.
I looked at a few examples, but couldn't find the one that did it with code.

I copied the content of said method here:
Code:
            // Create the Curvy Generator
            CurvyGenerator gen = CurvyGenerator.Create();
            gen.AutoRefresh = false;
            // Create Modules
            InputSplinePath path = gen.AddModule<InputSplinePath>();
            InputSplineShape shape = gen.AddModule<InputSplineShape>();
            BuildShapeExtrusion extrude = gen.AddModule<BuildShapeExtrusion>();
            BuildVolumeMesh vol = gen.AddModule<BuildVolumeMesh>();
            CreateMesh msh = gen.AddModule<CreateMesh>();
            // Create Links between modules
            path.OutputByName["Path"].LinkTo(extrude.InputByName["Path"]);
            shape.OutputByName["Shape"].LinkTo(extrude.InputByName["Cross"]);
            extrude.OutputByName["Volume"].LinkTo(vol.InputByName["Volume"]);
            vol.OutputByName["VMesh"].LinkTo(msh.InputByName["VMesh"]);
            // Set module properties
            path.Spline = TrackSpline;
            path.UseCache = true;
            CSRectangle rectShape = shape.SetManagedShape<CSRectangle>();
            rectShape.Width = 20;
            rectShape.Height = 2;
            extrude.Optimize = false;
#pragma warning disable 618
            extrude.CrossHardEdges = true;
#pragma warning restore 618
            vol.Split = false;
            vol.SetMaterial(0, RoadMaterial);
            vol.MaterialSetttings[0].SwapUV = true;

            msh.Collider = CGColliderEnum.None;
            return gen;
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
Noob Question - by Wyldhunt - 09-02-2021, 11:53 PM
RE: Noob Question - by _Aka_ - 09-03-2021, 09:10 AM
RE: Noob Question - by Wyldhunt - 09-03-2021, 07:06 PM
RE: Noob Question - by _Aka_ - 09-03-2021, 07:40 PM
RE: Noob Question - by Wyldhunt - 09-04-2021, 06:23 PM
RE: Noob Question - by _Aka_ - 09-04-2021, 06:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Newbie Question: Uniformly increase spacing between volume spots? SAMYTHEBIGJUICY 1 5 09-01-2023, 03:38 PM
Last Post: _Aka_
  I have a question about curvySpline haifeng.huang 12 32 07-14-2023, 09:34 AM
Last Post: _Aka_
  Question about generator Mos Def 7 1,807 04-10-2023, 10:20 PM
Last Post: _Aka_
Question Connection Question dazz777 1 121 11-22-2021, 01:42 PM
Last Post: _Aka_

Forum Jump: