07-16-2020, 08:35 AM
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 Thanks again.
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 Thanks again.