Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Realistic Trailer Steering Prototype
   
Award
Favorite
Favorited
Unfavorite
Tags: v1.13.3
File Size
Posted
Updated
420.991 KB
1 Jan @ 1:49am
5 Jan @ 2:51am
2 Change Notes ( view )

Subscribe to download
Realistic Trailer Steering Prototype

In 1 collection by Tingil
SIBTaT
4 items
Description
IRL, trailers that can steer, do so not by using the same steering value that the tractor uses (or any modification of it), but depending on the angle between the tractor and the trailer.

I've attempted to mimic this real-life behavior in Stormworks by having the tractor transmit its compass value (in this prototype taken from a physics sensor) to the trailer. The trailer has its own compass and uses both those values to calculate its own steering value. The formula used here is:

clamp(sin(pi2*(y-x))*z, -1, 1)

x is the tractor's compass value, y is the trailer's compass value and z is a steering factor used for fine-tuning (in this prototype simply 1).

This allows to have realistic and reliable trailer steering, that is helpful e.g. when reversing and does not fight you when trying to do so.

My message to the people maintaining SIBTaT
IRL, trailer steering works based on the angle between tractor and trailer at the 5th wheel. Meaning, IRL you can steer left and right all you want in your tractor and your trailer's steering does not care. All your trailer's steering looks at is that angle.

I've made this prototype to demonstrate this behavior in Stormworks.

My question/suggestion here would be, how to implement such steering within the bounds of SIBTaT, so it just works with SIBTaT compatible tractors and trailers.

As you can see in that prototype, I passed the tractor's compass value to the trailer, so the trailer can calculate the necessary steering value based on the tractor's compass and its own compass. However, SIBTaT assumes that the tractor knows how to steer its trailer.

This might be true when you have only one trailer: You could pass the trailer's compass value to the tractor that can then calculate the steering, however, IMHO that'd be the wrong approach for at least two reasons:

  1. The tractor does not know anything about the trailer's steering and it shouldn't have to. How many steering axis are there on a trailer? Do they all use the same steering value or do they use different ones? IMHO the tractor should not be concerned about such things. The trailer knows best how to steer itself. - Yes, you could work around that by passing the compass value from the trailer to the tractor and on the trailer side multiplying the steering value from the tractor so it makes sense for your trailer, but you'd be passing values via the connector back and forward, introducing signal lag when you would not need to. Also you would spread out trailer steering logic over tractor and trailer instead of having all the logic in one place (IMHO the trailer), which makes it harder to understand, to debug and to update.
  2. The whole thing falls apart when you have a chain of more than one trailer. Each trailer needs to decide its own steering value based upon the aforementioned angle to the other trailer that is towing it and not based on the tractor at all (e.g. think of a road train with multiple trailers, going through an S-curve). The tractor cannot provide that. - IMHO the reasonable thing to do here is to have every trailer (and tractor, of course) pass its compass value to its following trailer.

I hope you see my predicament. I'd love to be able to implement such realistic trailer steering, but without a standard, it'd only work with my own creations, which, IMHO, would not make much sense.

Therefore I'd kindly ask to consider including support for such steering within SIBTaT, so everyone using such creations from the workshop can benefit from it. :)

In case this already exists and I am simply oblivious to it, please disregard and just let me know. Thanks! :)