Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing train speed
I am trying to change the train speed with a slider in the the Train example scene.
However whenever I adjust the speed in TrainManager.cs  , it reverts the trains position back to 0 on the spline. 
How can I adjust the trains speed on the fly ?

You tried this in the editor while having TrainManager in the inspector? It's just an example script, so setting speed does trigger OnValidate() and there reset() is called who reset positions.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Train tracks with transparent middle? jh092 4 114 07-03-2020, 07:13 PM
Last Post: _Aka_
  Changing Volume Mesh UV ATHellboy 15 2,098 03-19-2020, 05:35 AM
Last Post: ATHellboy
  Trying to create a moving train that slows and stops at stations Novian 11 6,616 12-12-2019, 06:40 PM
Last Post: _Aka_
  Train Manger - multiple Trains and Splines teamteam 1 726 11-12-2019, 02:07 PM
Last Post: _Aka_

Forum Jump: