Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to modify Example 12 to work bi-directionally and more than 2 connected splines
#1
Question 
Hi there,


And my apologies for having to ask for help.  I have been wanting to create a simple train track scenario with many track junctions and a bidirectional behaving train with no train cars but the ability to go in any direction.  First thing I noticed is that the example E12 is designed for one way operation only because I tried to, and it just would not work in reverse direction with a second controllable junction. I was hoping that E12 example was using a generic train controller I could use but it does not appear to work.  So, I have attempted to create my own solution based on your scripts, but I have hit a snag! I have managed to get the train controller to behave correctly when a junction is only made up of 2 connected splines but anything more than 2 (3+) then I get odd behaviours in track selection. I am not the best coder and I am sure it is my fault but any advice you can give would be appreciated.


I have attached a document with some pictures and text to help explain the two scenarios that I have been testing.

.docx   E12 Track Junction testing.docx (Size: 942.76 KB / Downloads: 4)

I know that the solution is to not use any more than 2 splines but there are going to be situations where I need to have more than 2 connections and I need to figure out how to get the train to work generically for any number of connections, within reason ofc.



If you could read my doc and then give me some pointers or maybe there is already a generic train controller on the forum that has already been written?



Thanks.



Dan
Reply


Messages In This Thread
How to modify Example 12 to work bi-directionally and more than 2 connected splines - by Mambosa - 11-26-2022, 08:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information New free asset: Converter For Unity Splines _Aka_ 3 16 3 hours ago
Last Post: nehvaleem
  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_
  Using Unity's SplineContainer in Curvy Splines dlees9191 3 15 02-26-2024, 09:49 AM
Last Post: _Aka_

Forum Jump: