// Use this for initialization protected override IntPtr Init() { Vector3 posA = transform.position + archorA; Vector3 posB = transform.position + archorB; RopeJointDef jd = new RopeJointDef(other.body, body.body); jd.localAnchorA = new Vector2(posA.x, posA.y); jd.localAnchorB = new Vector2(posB.x, posB.y); jd.maxLength = maxLength; return API.CreateRopeJoint( B2DWorld.instance.world, jd ); }
public static extern IntPtr CreateRopeJoint( IntPtr w, RopeJointDef def );
public static extern IntPtr CreateRopeJoint(IntPtr w, RopeJointDef def);