Open hotdamndel opened 2 weeks ago
I actually wrote most of this several years ago: https://github.com/leezer3/OpenBVE/pull/501
Trouble is that traction modelling (the logical follow-on) is nowhere near being done, and I just end up bodging bits badly into the existing code, which was never designed to do stuff.... That's one of the reasons I've mostly been re-writing things slowly over the last few years, so that stuff like this can be added in sensibly.
If that PR looks interesting, it'd probably be simple enough to revive.
Looks promising. I'd honestly contribute a lot of traction and related sound realism, but can't code, so can only suggest the parts of my overall vision on how to make train simulation more realistic but still configurable and flexible enough
Many routes require catenary height variation (tunnels, etc) and pantographs on trains must react to that. However, currently it's either very difficult and route-specific via plugins, or just inachievable. I can suggest a simple solution (or at least my vision on it) - CatenaryHeight command for Track section in routes and a corresponding function for .animated files.
Route side:
Heights are interpolated similarly to .Brightness command (i.e. there are 50m "ramps" before tunnels in this example)
Train side:
-6.2 in this example is offset along the track from Car[i]'s model origin, since we need to receive catenary height from route position exactly matching Car[i]'s current position with some offset (pantos are rarely mounted in the middle of a car).