protected override void Initialise2(IntPtr world) { //float lenght = (BodyA.transform.position-BodyB.transform.position).magnitude; ThingPtr = LPAPIJoint.CreateDistanceJoint(world, BodyA.GetComponent <LPBody>().GetPtr(), BodyB.GetComponent <LPBody>().GetPtr() , BodyAAnchorOffset.x, BodyAAnchorOffset.y , BodyBAnchorOffset.x, BodyBAnchorOffset.y, lenght, CollideConnected); LPAPIJoint.SetDistanceJointDampingRatio(ThingPtr, Dampingratio); LPAPIJoint.SetDistanceJointFrequency(ThingPtr, FrequencyInHertz); }