From ba0beaffdc03d83f4d6b84d5d56b67d41cd8ae14 Mon Sep 17 00:00:00 2001 From: Takao Kato Date: Fri, 9 Jan 2015 09:58:09 +0800 Subject: [PATCH] fixed getParentToNodeTransform. it returned a wrong transform if _transformDirty was true. --- cocos/2d/CCNode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 4ab0364f15..74ba46945e 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1829,7 +1829,7 @@ const Mat4& Node::getParentToNodeTransform() const { if ( _inverseDirty ) { - _inverse = _transform.getInversed(); + _inverse = getNodeToParentTransform().getInversed(); _inverseDirty = false; }