Is there any way to make a script to measure and record wheel-vehicle body relative speed? Use this relative speed, with suspension motion ratio, I would like to cauculate the damper velocity at each corner, to tune the dampers. For the streams, here might be a official value to record the wheel's vertical velocity at Z axis. In my opinion, because the vehicle body motion is slow, so we can regard this wheel speed as wheel-vehicle body relative speed approximately. So the question is easy, does anyone have a script to real-time measure and record the wheel speed? Many thanks for your help.
I'm no expert but seems to me you could get and compare the velocity of the centre node of the wheel and the "velocity" of the car object? Been a while but I'm sure the BeamNG api exposed a way to get the velocity of a node. Someone please correct me if I am wrong.
I've made a mod that records wheel speed relative to the Gavril D-Series body by z-axis (select 'Measuring beam' part in the 'Tow Hitch' slot in part selector). You have to execute 'measuringBeam.dump()' command in console to dump the measurements to the 'beamVelocity.txt' file. How it works: there's a beam with 'beamSpring' and 'beamDamp' parameters set to 0, connecting the wheel hub node and some fender node. Once the car is spawned, the Lua code starts to insert beam contraction/expansion velocity in real-time to the 'data' table by running obj:getBeamVelocity(beamID) function. For example, it's easy to visualize the dumped values as a chart in Excel: