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
  Changing range affects generated mesh GameJazz 10 32 12-15-2022, 08:28 AM
Last Post: GameJazz
  Change Speed on spline linkinballzpokemon 1 27 12-29-2021, 10:58 AM
Last Post: _Aka_
  Accessing generator's input spline in script, changing it at runtime smackledorf 3 813 06-17-2021, 01:59 PM
Last Post: _Aka_
  Train car orientation on slopes bennidhamma@gmail.com 3 1,027 03-26-2021, 10:30 AM
Last Post: _Aka_

Forum Jump: