mirror of https://github.com/axmolengine/axmol.git
Fix collider detection
This commit is contained in:
parent
b1a8d48009
commit
e7d5ac3211
|
@ -79,7 +79,13 @@ void CCDisplayFactory::updateDisplay(CCBone *bone, CCDecorativeDisplay *decoDisp
|
|||
CCColliderDetector *detector = decoDisplay->getColliderDetector();
|
||||
if (detector)
|
||||
{
|
||||
CCAffineTransform t = CCAffineTransformConcat(bone->nodeToArmatureTransform(), bone->getArmature()->nodeToWorldTransform());
|
||||
CCNode *node = decoDisplay->getDisplay();
|
||||
CCAffineTransform displayTransform = node->nodeToParentTransform();
|
||||
CCPoint anchorPoint = node->getAnchorPointInPoints();
|
||||
anchorPoint = CCPointApplyAffineTransform(anchorPoint, displayTransform);
|
||||
displayTransform.tx = anchorPoint.x;
|
||||
displayTransform.ty = anchorPoint.y;
|
||||
CCAffineTransform t = CCAffineTransformConcat(displayTransform, bone->getArmature()->nodeToWorldTransform());
|
||||
detector->updateTransform(t);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue