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
  Generating multiple object on changing transform jawadkhan.9026 9 421 08-23-2019, 02:16 PM
Last Post: _Aka_
  Connections during speed change 3583Bytes 8 1,320 04-05-2019, 01:12 PM
Last Post: _Aka_
  Pitch and Speed sirak 1 761 11-23-2018, 02:48 PM
Last Post: _Aka_
  Trying to create a moving train that slows and stops at stations Novian 7 2,708 09-13-2018, 08:46 PM
Last Post: ClaudePorter

Forum Jump: