b2w_setDistanceSpring function

  1. @Native<Void Function(Int64, Float, Float)>(ffi.Int64, ffi.Float, ffi.Float)>()
void b2w_setDistanceSpring(
  1. int jointHandle,
  2. double hertz,
  3. double dampingRatio
)

Give a distance joint a spring that pulls toward its rest length (the middle of its range): hertz is how fast it swings, dampingRatio how soon it settles (0 never, 1 without overshoot). With an open range the ends still stop it; with equal lengths there is only the spring. hertz 0 takes the spring away.

Implementation

@ffi.Native<ffi.Void Function(ffi.Int64, ffi.Float, ffi.Float)>()
external void b2w_setDistanceSpring(
  int jointHandle,
  double hertz,
  double dampingRatio,
);