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
  Change Speed on spline linkinballzpokemon 1 9 12-29-2021, 10:58 AM
Last Post: _Aka_
  Accessing generator's input spline in script, changing it at runtime smackledorf 3 811 06-17-2021, 01:59 PM
Last Post: _Aka_
  Train car orientation on slopes bennidhamma@gmail.com 3 1,022 03-26-2021, 10:30 AM
Last Post: _Aka_
  Controller speed questions Lupp_ 6 1,859 01-20-2021, 09:20 PM
Last Post: _Aka_

Forum Jump: