cocos2d / cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
https://www.cocos.com
3.06k stars 902 forks source link

wrong armature position in json scene #3051

Open jaunusa opened 9 years ago

jaunusa commented 9 years ago

Create a simple scene in Cocos Studio, add the default armature. Export it and load it into Cocos JS project.

You will see that the position is incorrect. The position can be fixed by calling this function on the armature:

armature.updateOffsetPoint();

I think some miscalculation happens in CCArmature.js (line 383), when this functions are called:

return cc.rectApplyAffineTransform(boundingBox, this.getNodeToParentTransform());

Untill this line the boundingBox values are correct.

pixmaster commented 9 years ago

We have a similar problem. We began testing our game on cocos v3.7. And some armature have been shifted from their positions. And some TextBMFont had incorrect characters. Examples V3.6 sm_v36 V3.7 sm_v37 V3.7 anim2_v37

pixmaster commented 9 years ago

Update for 3.7.1 Armature position fixed. TextBMFont not fixed. TextBMFont is incorrect if use text color - "CColor" in scene json.