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
Question Changing speed between ControlPoints funkd 5 601 10-02-2020, 12:36 PM
Last Post: _Aka_
  How to ping-pong a train? jamesunity 5 902 07-13-2020, 11:56 AM
Last Post: _Aka_
  Train tracks with transparent middle? jh092 4 721 07-03-2020, 07:13 PM
Last Post: _Aka_
  Changing Volume Mesh UV ATHellboy 15 4,239 03-19-2020, 05:35 AM
Last Post: ATHellboy

Forum Jump: