Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input Spline Shape @ Runtime
#2
For others ... took a while, but I figure this out too.  You create a Generator in the editor and put all your shapes into the editor.  Then create an attribute:

    public InputSplineShape[] Roads;
    
That has a reference to each of the shapes you created in the ditor.

During runtime, after you've constructed the generator, you copy the appropriate shape to the generator for the shape of the road.
    
    var GENERATOR = CurvyGenerator.Create();
    var SHAPE = Roads[0].CopyTo(GENERATOR);

As for the materials, simply assign it to the volume:

    var VOLUME = GENERATOR.AddModule<BuildVolumeMesh>();
    VOLUME.SetMaterial(0,RoadMaterials[0]);


Jake, any other comments/suggestions?
Reply


Messages In This Thread
Input Spline Shape @ Runtime - by Elenesski - 09-13-2016, 04:49 AM
RE: Input Spline Shape @ Runtime - by Elenesski - 09-13-2016, 07:43 PM
RE: Input Spline Shape @ Runtime - by Jake - 09-21-2016, 07:15 PM
RE: Input Spline Shape @ Runtime - by Elenesski - 09-22-2016, 08:44 PM
RE: Input Spline Shape @ Runtime - by Elenesski - 10-02-2016, 08:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Best way to duplicate a spline with an offset Kapistijn 8 1,413 04-12-2026, 03:18 PM
Last Post: _Aka_
Smile Constant speed along a spline? tfishell 1 663 11-13-2025, 11:32 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,470 07-29-2025, 09:15 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 7 6,256 07-13-2025, 07:11 PM
Last Post: _Aka_

Forum Jump: