public static void SetWorldConnectedAnchorPosition(AnchoredJoint2D joint2D, Vector2 worldConnectedAnchor) { if (joint2D.connectedBody) { joint2D.connectedAnchor = Helpers2D.InverseTransformPoint(joint2D.connectedBody.transform, worldConnectedAnchor); } else { joint2D.connectedAnchor = worldConnectedAnchor; } }
public static void SetWorldMainAnchorPosition(AnchoredJoint2D joint2D, Vector2 worldAnchor) { joint2D.anchor = Helpers2D.InverseTransformPoint(joint2D.transform, worldAnchor); }