b2w_createDistanceJoint function

  1. @Native<Int64 Function(Int64, Int64, Int64, Float, Float)>(ffi.Int64, ffi.Int64, ffi.Int64, ffi.Float, ffi.Float)>()
int b2w_createDistanceJoint(
  1. int worldHandle,
  2. int bodyA,
  3. int bodyB,
  4. double minLen,
  5. double maxLen,
)

A rope or rod between the two bodies' origins: their distance stays within minLen, maxLen, free in between and rigid at the ends; equal lengths make a rigid rod. b2w_setDistanceSpring makes it springy.

Implementation

@ffi.Native<
  ffi.Int64 Function(ffi.Int64, ffi.Int64, ffi.Int64, ffi.Float, ffi.Float)
>()
external int b2w_createDistanceJoint(
  int worldHandle,
  int bodyA,
  int bodyB,
  double minLen,
  double maxLen,
);