From d5dd3c982c199b6e6dd4330d172aedc7ee6e2b93 Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Wed, 12 Oct 2016 16:05:00 +0800 Subject: [PATCH] fixed convertToWorldSpace return value --- cocos2d/core/utils/base-node.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cocos2d/core/utils/base-node.js b/cocos2d/core/utils/base-node.js index b43675cbab..01e91122b4 100644 --- a/cocos2d/core/utils/base-node.js +++ b/cocos2d/core/utils/base-node.js @@ -1572,8 +1572,7 @@ var BaseNode = cc.Class(/** @lends cc.Node# */{ } var x = nodePoint.x - this._anchorPoint.x * this._contentSize.width; var y = nodePoint.y - this._anchorPoint.y * this._contentSize.height; - var worldPositionIgnoreAnchorPoint = this._sgNode.convertToWorldSpace(cc.v2(x, y)); - return worldPositionIgnoreAnchorPoint; + return cc.v2(this._sgNode.convertToWorldSpace(cc.v2(x, y))); }, /**