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
Smile Constant speed along a spline? tfishell 1 604 11-13-2025, 11:32 AM
Last Post: _Aka_
  Train-Wagon Wheels stathias 3 2,152 08-30-2024, 12:46 PM
Last Post: stathias
  Controler Speed from metadata Bryan Thatcher 4 2,578 06-25-2024, 11:18 AM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 2,527 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: