You build tracks by using different blueprints (one is straight, one is a curve etc) You can simply scroll threw them. This is fine and suits to the rest of the game.
A mining car gets spawned at the beginning of the track and travels along the whole track.
How I did it:
Every blueprint has a spline component included which dictates the movement
The car checks at certain points what he is currently overlapping with and chooses this spline to follow along.
It kinda works, but needs a lot of precise box collisions etc. Not very ideal…
How I wanted to do it but couldnt figure out how:
Each time you build a new track (remember, different blueprints) the included spline checks for already existing ones (tracks that have been build before) and connect the spline to one big spline that the car can follow more easily.
I dont know how to connect points, if this is even possible.
Do you guys have any idea how I could do this? Couldnt find any resource on this.
Or do you have a even better idea to solve this?
As always, thanks a lot you lovely people.
BR and stay healthy