Unlisted
No Tags
constants:
k (spring constant)
c (damping constant)
values do not correspond to real life units, don't copy values from real life/ other software and expect it to work first try
deltaTime is the time difference between this frame and the previous frame, you can assume it to be 0.01 but this will make it act differently in low physics
(if you are just using it for gauges, and not moving parts, you can cheat though)
SETTER v: v + deltaTime * (k*(x_tgt - x) - c*v)
SETTER x: x + deltaTime * v
Controls:
VTOL: move gauge
Activate8: change deltaTime (0.01 when on, 0.02 when off)