Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating splines at run time
#1
Hi,

I'd like players to be able to place stations and then as a simple step at this early stage, have a spline automatically drawn between the stations at run time.

Should this be fairly easy to accomplish? Just work out the vector between point A and B and make it create a spline?

How can I then have it generate a mesh on this? I've had a play with the generator which is very powerful but obviously at run time I'd need a saved template to be accessed and used to create railway track, can this be done in some way?

Thinking ahead though, where I'd like players to lay track how they like, would it be possible to create prefabs of sections of track (straights, curves etc) with a spline and control point on each gameObject, then lay these down on a grid system with the pieces of track creating a joined spline when placed next to each other? Or would you go about it a different way where they draw the track in a similar way to the "paint splines" example?

Sorry for so many questions, once I'm off in a direction that will work hopefully I won't need to keep bothering you Big Grin  Thanks again.
Reply


Messages In This Thread
Creating splines at run time - by jamesunity - 07-16-2020, 08:35 AM
RE: Creating splines at run time - by _Aka_ - 07-16-2020, 10:47 AM
RE: Creating splines at run time - by jamesunity - 07-16-2020, 06:12 PM
RE: Creating splines at run time - by _Aka_ - 07-16-2020, 06:54 PM
RE: Creating splines at run time - by jamesunity - 07-16-2020, 07:40 PM
RE: Creating splines at run time - by _Aka_ - 07-16-2020, 08:02 PM
RE: Creating splines at run time - by jamesunity - 07-17-2020, 10:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information New free asset: Converter For Unity Splines _Aka_ 5 17 Yesterday, 11:11 AM
Last Post: _Aka_
  Help creating a wedge Thinkurvy 2 3 04-24-2024, 12:25 PM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: