HingeJoint2D组件的anchor如何计算的?

小白请教下,HingeJoint2D组件的anchor如何计算的?A点是固定的,b点添加了HingeJoin2D组件,b点会进行运动,运动过程如何计算出anchor的?现在计算的结果有问题,角度偏差了,现在是这样计算的。anchorNode是A点。
private getAnchor() {
const stickmanPosition = this.node.getChildByName(‘body’).getWorldPosition();
const anchorPosition = this.anchorNode.getWorldPosition();

    const anchorRelativePosition = anchorPosition.subtract(stickmanPosition);
    const anchorX = anchorRelativePosition.x;
    const anchorY = anchorRelativePosition.y;
    
    return new Vec2(anchorX, anchorY );
}