CocosBuilder icon indicating copy to clipboard operation
CocosBuilder copied to clipboard

Arranging sprites behind a parent sprite

Open Myran opened this issue 11 years ago • 7 comments

Currently, to my knowledge, there doesn't seem to be a way to arrange a child sprite behind a parent sprite. The arrange menu only seems to affect the order amongst children of a sprite.

While it is possible to do in code it would help a lot if that function was available in cocosbuilder.

Myran avatar Mar 27 '13 15:03 Myran

Yes, this is a needed feature. Will try to figure out some good (interface wise) way to do this. Suggestions much appreciated!

vlidholt avatar Mar 28 '13 22:03 vlidholt

I would be happy to help with interaction design on this project as UX is my main area of expertise. However I cannot find any design documents or similar in the rep. Is design managed elsewhere?

Myran avatar Apr 03 '13 13:04 Myran

Look at how it is done in Photoshop or sny Apple app - stuff we are familiar with.

MKGitHub avatar Apr 03 '13 15:04 MKGitHub

This is actually something that I would like to see done. Perhaps have a property in the properties menu that sets zlevel instead of having zlevel defined by position on the tree? A current project is riding on this functionality and it's kinda hacky right now :)

CroSSGunS avatar May 10 '13 02:05 CroSSGunS

Does cocos2d even support this? My understanding was that children always draw in front of the parent.

deemen avatar May 15 '13 01:05 deemen

This is possible, with modification of VertexZ. The only problem with this is that it's possible to cause zfighting without care. I think it could be implemented as an advanced option, because it's fairly labour intensive to get it to work correctly.

CroSSGunS avatar May 30 '13 11:05 CroSSGunS

You shouldn't need to play with the VertexZ. Setting the ZOrder of the node to negative should draw it before its parent.

deemen avatar May 30 '13 13:05 deemen