Hi,
It is weird that the junction doesn't seem to have an effect. Can you please follow the steps bellow, and let me know if any one of them fails?
1. Open scene 12
2. Press play
3. Do not click on the Use Junction checkbox. The train must go to the right when reaching the junction
4. Exit play mode
5. Reenter play mode
6. Click on the Use Junction checkbox. The checkbox must be become checked. The train must go to the left when reaching the junction.
FYI, the scene 12 is part of the WebGL demo too (as are most example scenes). You can test the junction there too if you wish.
Code wise, the main thing to know is the SplineController.ConnectionBehavior property, which defines how a controller behaves when reaching a junction. Bellow are links to its documentation:
· User manual: https://curvyeditor.com/documentation/co...s_handling
· API reference: https://api.curvyeditor.com/FluffyUnderw...avior.html
Example scene 12 showcases the change of this value dynamically at runtime. The steps are as follow:
1. The checkbox is part of a canvas attached to the control point with the junction (RailtrackPathA.CP0002)
2. The checkbox modifies the value of a custom control point metadata, used to store the state of the junction (script: E12_MDJunctionControl)
3. When the train reaches the junction, it reads the state of the junction, and changes the controller's ConnectionBehavior accordingly (script: E12_TrainCarManager, specifically in the OnCPReached method).
I hope these explanations helped.
Please let me know if you still have questions.
Have a nice
It is weird that the junction doesn't seem to have an effect. Can you please follow the steps bellow, and let me know if any one of them fails?
1. Open scene 12
2. Press play
3. Do not click on the Use Junction checkbox. The train must go to the right when reaching the junction
4. Exit play mode
5. Reenter play mode
6. Click on the Use Junction checkbox. The checkbox must be become checked. The train must go to the left when reaching the junction.
FYI, the scene 12 is part of the WebGL demo too (as are most example scenes). You can test the junction there too if you wish.
Code wise, the main thing to know is the SplineController.ConnectionBehavior property, which defines how a controller behaves when reaching a junction. Bellow are links to its documentation:
· User manual: https://curvyeditor.com/documentation/co...s_handling
· API reference: https://api.curvyeditor.com/FluffyUnderw...avior.html
Example scene 12 showcases the change of this value dynamically at runtime. The steps are as follow:
1. The checkbox is part of a canvas attached to the control point with the junction (RailtrackPathA.CP0002)
2. The checkbox modifies the value of a custom control point metadata, used to store the state of the junction (script: E12_MDJunctionControl)
3. When the train reaches the junction, it reads the state of the junction, and changes the controller's ConnectionBehavior accordingly (script: E12_TrainCarManager, specifically in the OnCPReached method).
I hope these explanations helped.
Please let me know if you still have questions.
Have a nice
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Please consider leaving a review for Curvy, this helps immensely. Thank you.

