I’ve been trying to create my own train sim for a long time now, but always have failed beacuse of not knowing a good way to controll the train and keep it on the track. If anyone knows a free spline tool that alows me to controll a junction trough a C# script or knows a way to pull it of in a other resonable way, please help!
@fabi090806, Sebastian Lague on youTube has an excellent spline based road creator that will work perfectly. It allows open or close spline paths.
It does not have junctions built in, but it is easy to create junctions by placing two splines touching or near each other, and then creating a Trigger Collider (can be on an empty object) and placing it at the location where you want a junction. You can then detect the trigger and switch splines for your train. You’d have to work out the details
I did this recently as proof of concept for another person asking for help and it worked pretty slick, though in the end they took Sebastian’s code (it’s a free download) and modified it to effectively (I don’t think actually) join splines. You can do a search on the Unity Forum for that discussion (not this forum).