07-14-2020, 01:18 PM
Hi,
I see your problem as being two separate problems:
1- find the way between points A and B
2- make the train follow that way
Point 2 is related to Curvy. Using a mechanism similar to the Junction mechanism in the example scene 12 should do the trick.
Point 1 is a wider problem, not specific to Curvy. It's basically path finding. Since you are planning to have multiple rail roads connected, I think you better try to find an already existing path finding solution that would work good, instead of trying to invent your own path finding algorithm. I have no real experience with the path finding problematics, but I did some projects using that when student. A* algorithm was a good algorithm at that time (is there anything better since?). It's a simple algorithm, and I am sure you can easily find implementations for it using C#
I would advise you to read this: https://en.wikipedia.org/wiki/Pathfinding
I see your problem as being two separate problems:
1- find the way between points A and B
2- make the train follow that way
Point 2 is related to Curvy. Using a mechanism similar to the Junction mechanism in the example scene 12 should do the trick.
Point 1 is a wider problem, not specific to Curvy. It's basically path finding. Since you are planning to have multiple rail roads connected, I think you better try to find an already existing path finding solution that would work good, instead of trying to invent your own path finding algorithm. I have no real experience with the path finding problematics, but I did some projects using that when student. A* algorithm was a good algorithm at that time (is there anything better since?). It's a simple algorithm, and I am sure you can easily find implementations for it using C#
I would advise you to read this: https://en.wikipedia.org/wiki/Pathfinding
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.