UI animation child position bug?

When exporting animation the position of nodes that are child of any other node are exported as relative to this node which is normal.

But when playing animation in the game the child position is relative to screen.

Example:
-I have ImageView and Label as a chilld.
-If I animate by moving Label to position (-100,100) in parent space (ImageView) in cocostudio everything is fine,
but in game label will be set to positon (-100,100) in screen space.

Someone managed to workaround this problem?

@kubas121
Currently the CocoStudio UI editor uses v2.x as its renderer.
The UIWidget classes don’t have ContentSize in v2.x but the v3.x version does have.
So you might need to add an offset of Vec2(parentSize.width * parentAnchoPoint.x, parentSize.height * parentAnchorPointY) to the child widget after been added to its parents.

Is it okey to provide us your studio project file? we can make it a test case and make sure it’s fixed in the next version.

1 Like

I do believe that I have the same error here.
All my animations look like they are getting the wrong position (not relative to it’s parent).

Not sure how to fix it, it just happens when animating an UI, without the animation the UI looks good.

Please advice.

Thanks,

nite told me the new cocostudio release is schedulded for 12 of september. Just wait two more days :wink:

Great.

In fact I just found where the error is, it is on the exporter of the position of animations.
They do not take into account the they could be child of other node and the “world position”, relative to the layer, is different (added by the parent’s node).

I was fixing it on the Code, but that would be much more troublesome. If CocoStudio was an OpenSource program I believe this kind of problems would be solved really fast.

Thanks,

1 Like

We are experiencing the same problem. We really need to be able to do this. Cocos Studio is a great editor and manages to save us a lot of time but this kind of problems (not being open source) is a bit of an ass. It seems the fix for this (next cocos studio version) was going to be scheduled on 12 of september but I think it has not been released yet. Is there any more information about this?

Thanks in advance.

We delay the release to 30th, because we want to take extra time to make sure this release has good quality. And developing a cross platform version requires some extra effort.

Hi,

Ok, this is great. Just wanted to know where we coudl expect the release :).

Cheers.