Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting Generator Spline Input Path programmatically
#1
I would like to create a roller coaster track programmatically. 

I've set up a spline dynamically from some input points and would like to create now the coaster track mesh also dynamically. What I fail to find is how I can access the input path from the generator programmatically.

Thanks for any help on this!
Martin
Reply
#2
Hello Martin,

You could simply create an empty spline, set it as the input path for the generator in the editor.
And use that empty spline in your script and add control points to it. (That is what I am doing for my game)
You could also get the "InputSplinePath" script component and edit there the connected spline or the range over witch the mesh should be generated.

Have a nice day,
Ioan Marcu
Reply
#3
Ah, thanks, yeah, stupid me overlooked the child objects where the InputSplinePath script was attached to. Was able to set there the spline manually and in my coaster vehicle controller and now it runs fine. Thanks!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Batch processing of the Generator to create a bunch of Meshes HatraE 3 13 10-21-2020, 11:21 AM
Last Post: _Aka_
  Frequent runtime updates of Curvy Generator for simulating plant growth using Splines h4ck3rd4wg 6 192 10-02-2020, 07:57 PM
Last Post: _Aka_
  Generate Mesh Spline from GameObject processor 4 147 10-01-2020, 11:00 AM
Last Post: _Aka_
  Generated mesh using bezier spline is not following the path accurately processor 3 265 08-25-2020, 04:39 PM
Last Post: _Aka_

Forum Jump: