Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing train speed
#1
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 ?


Thanks
Reply
#2
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.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Spline Controller Animate - Don't understand the Speed and TimeScale properties GenericJoe 8 235 05-10-2018, 10:42 AM
Last Post: _Aka_
  Speed variable in Spline Controller eco_editor 1 64 05-02-2018, 10:47 AM
Last Post: _Aka_
  Extending the controller, changing speed HundredTai 2 152 04-03-2018, 04:17 PM
Last Post: _Aka_
  How to set a speed in Unity Editor akira_sh512 2 304 01-26-2018, 12:36 PM
Last Post: akira_sh512

Forum Jump: