|Topic was automatically imported from the old Question2Answer platform.
|Giovanni “Johnny” Co
Hello and thank you in advance to anyone who will share his/her opinion.
I would like to simulate a one way monorail system as per the below schematics.
My approach would be to define 9 path2ds and then - using a reparenting of the Pathfollow2d - I would move the vehicle from the current path to the one connecting to the desired arrival Station.
At the moment I have only set up 2 paths and I am only able to move a vehicle from Station A path2d 2 to the Main track path2d 1 via reparenting.
I can not figure out - as an example - how to instruct the vehicle to move from the Main track path2d 1 to the arrival exit track (e.g. Station C path2d 5).
In the final project I would like to have a setup as the above picture and a simple GUi, as per the below picture:
I would love to read your suggestions on the following topics:
- How would you approach the matter of coding - in Godot - the described system.
- If you agree on using multiple 2dPaths and how you would tackle the “exit at Station X” issue
- In which way is created - in Godot - a “Station” Object, e.g. an object which stores each station information (name, number of available vehicles currently at the station) and a “Vehicle” Object, e.g. an object which stores each vehicle information (vehicle id, current path, current station, current x, current y).
Thank you for reading, any comment will be highly appreciated.
The reddit user Arigoru posted his approach to the question here: reddit link alongside a demo video.
Thank you Arigoru!
Giovanni “Johnny” Co | 2020-02-08 22:45