A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2015.2778 | Released: 1 Dec 2015, 4:38am | What's New | Download Now

joint:getAnchorA( )


A function that returns the (x,y) coordinates of the joint’s anchor points within objects A and B, which are the two joined objects. The values are given in the local coordinates of each object, so an anchor point at the center of the object would be at position (0, 0).


x, y = joint:getAnchorA( )


x, y = myJoint:getAnchorA()
x, y = myJoint:getAnchorB()

Supported on operating systems and platforms for build numbers shown:
  • Mac OS X:
    Build 2010.222
  • Windows:
    Build 2010.222
  • iOS:
    Build 2010.222
  • Android:
    Build 2010.222


User offline. Last seen 2 years 21 weeks ago. Offline
Joined: 7 Feb 2011

I tested touch joint.
It seems that:
AnchorA is the position of the target point.
AnchorB is the global position the of anchor point on the physical object which is being dragged.