Torsion hydros are a variant of hydros , however instead of being a beam whose length varies on demand, they’re set-up as a torsion bar where the angle between both ends can be changed on demand.
The limits can either be set using the factor setting, which sets an identical limit in each direction, or using the inLimit and outLimit parameters. The values are the angle of rotation in radian, meaning a value of 6.28, or 2*PI, is equivalent to a full 360 degree turn.
Examples of uses include steering boxes on trucks and older vehicles, as well as openable panels.
As they are very similar to hydros and share some of the code, they use the same in/out notation as regular hydros, with out being used with positive electrics value, and in with negative values. The picture below shows which direction they correspond to.
If your torsion hydro turns the wrong way, the easiest way to fix it is to change the factor or inputfactor (if using in/outLimit) to a negative value.
Required arguments
Optional arguments
This angle limit of the torsion hydro in each direction.
The total lock to lock angle will be twice this value.
Negative values will cause the hydro to spin the opposite way.
Used along with inLimit and outLimit. Gets overwritten by “factor”.
Negative values will cause the torsion hydro to spin the opposite way.
Example
"torsionHydros": [
["id1:","id2:","id3:","id4:"],
{"spring":200000, "damp":20, "deform":"FLT_MAX", "strength":50000},
["st2r","st2l","st3l","st1ll", {"factor":-0.57,"steeringWheelLock":570,"inRate":5,"outRate":5,"inputSource":"steering_input"}],
["st2l","st2r","st3r","st1rr", {"factor":-0.57,"steeringWheelLock":570,"inRate":5,"outRate":5,"inputSource":"steering_input"}],
],
"torsionHydros": [
["id1:","id2:","id3:","id4:"],
{"spring":100000, "damp":100, "deform":"FLT_MAX", "strength":"FLT_MAX"},
{"breakGroup":"spareholder_hinge_b"},
["bd9rr","sh2rrr","sh1rrr","sh1r", {"factor":1.55,"steeringWheelLock":650,"inRate":1.2,"outRate":1.8,"inputSource":"tailgate"}],
{"breakGroup":""},
],