Hydros

Hydros

From BeamNG
Hydros

Hydros

Hydros are beams that can change length on the fly. For now they are mostly used for vehicle steering, but advanced functionality has been added, allowing for hydros to be triggered by a myriad of input sources, such as headlights.

They are just like a regular beam, except they have a contraction/expansion factor. A hydro would go in the place of a tie rod in a real vehicle's steering setup.

SteeringWheelLock is used to determine how much the steering wheel prop will rotate. This is so that the steering part containing the hydros can be swapped out for a faster one without having to edit any prop data. The dynamic steering code also reacts accordingly to different amounts of steering wheel lock. So a large truck with 720 degrees of lock each way will be a lot more sluggish than a rally car with ultra-fast 270 degree steering.

Additionally, lockDegrees can be used for vehicles whose wheels turn a lot more or less than average. This is not exactly precise or scientific, and its sole purpose is to interact better with the dynamic steering code. The "default" is 35 degrees, which is average for most cars. Only use this on vehicles which seriously deviate from the average.

	"hydros": [
			["id1:","id2:"],
			{"beamSpring":21501000,"beamDamp":250,"beamDeform":83000,"beamStrength":98000},
			{"beamPrecompression":1.00},
			["fa3r","fx2r",{"factor":-0.28,"steeringWheelLock":460,"lockDegrees":25}],
			["fa3l","fx2l",{"factor":0.28,"steeringWheelLock":460,"lockDegrees":25}],
			{"beamPrecompression":1},
	]


Arguments

Arguments

Name Type Optional Default Value Description
id1 string NOk n/a The first node name
id2 string NOk n/a The second node name
inRate float Ok n/a How fast the hydro will retract
outRate float Ok n/a How fast the hydro will expand
inLimit float Ok n/a inLimit limits the amount the hydro can retract, 0.5 would be half the original length
outLimit float Ok n/a outLimit limits the amount the hydro can expand, 2.0 would be twice the original length
inputCenter float Ok n/a
autoCenterRate float Ok n/a
inputSource float Ok n/a Associated electrics channel (or keyboard key, deprecated)
inputFactor float Ok n/a


Advanced hydro options

We have added the ability to have hydros that are sourced from anything, not just steering. For example you could have opening headlights or a working convertible top. These are the extra options. It's recommended to add these inline to the hydro to avoid having to change the header (as mismatched headers between merged sections cause a fatal error). Also, many of these options may not be necessary at all for some applications, so they don't need to be defined.

  • inputSource
  • inputFactor
  • inLimit
  • inRate
  • outLimit
  • outRate
  • inputCenter
  • inputInLimit
  • inputOutLimit
  • autoCenterRate

The list of input sources is small right now, but we will add some specialized and generic input sources, like rear-wheel steering and generic numbered commands in the future.

Syntax example for pop-up headlights:


	"hydros": [
			["id1:","id2:"],
		    {"beamDeform":485000,"beamStrength":690000},
		    {"beamLimitSpring":61000,"beamLimitDamp":100},
		    {"beamSpring":61000,"beamDamp":100},
		    {"breakGroup":"super_headlight_R"},
			{"deformGroup":"super_headlightglass_R_break"}
			["f6r","he2r",{"inputSource":"lowhighbeam","inLimit":0,"outLimit":1.44,"inRate":1,"outRate":1,"inputFactor":1}],
			["f6rr","he2rr",{"inputSource":"lowhighbeam","inLimit":0,"outLimit":1.44,"inRate":1,"outRate":1,"inputFactor":1}],
		    {"breakGroup":""},
	],