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
  Trying to create a moving train that slows and stops at stations Novian 7 200 09-13-2018, 08:46 PM
Last Post: ClaudePorter
  Spline Controller Animate - Don't understand the Speed and TimeScale properties GenericJoe 12 1,265 07-20-2018, 09:02 PM
Last Post: GenericJoe
  Extending the controller, changing speed HundredTai 4 547 06-07-2018, 06:04 PM
Last Post: _Aka_
  Movement speed mythstified 3 437 06-01-2018, 03:37 PM
Last Post: _Aka_

Forum Jump: