Is there anyway I can change the z position of a CCSprite that's already on a layer?
Thanks!
A fast, easy to use, free, and community supported 2D game engine
Is there anyway I can change the z position of a CCSprite that's already on a layer?
Thanks!
I tried using setVertexZ, but of course that changes the scale of the item.
I ended up just removing the sprites, and then adding them back in in the order they were supposed to be.
Thoughts on how to make a smooth transition between removing and re-adding?
You can change zorder property. I was going to reply but I don't have the exact syntax in front of me. sprite.zOrder = 2 or something like that. Search the forum. Something should come up.
Hi jd.
Thanks for the reply. Can this forum email notifications when a thread has been replied to? Anyways, I got it working.
CCSprite *cardSprite; // declare a sprite here
int newZIndex = 2;
// self is a CCColorLayer
[self reorderChild:cardSprite z:newZIndex];
Glad you got it working. I can find 90% of my answers either in the demo test that come with cocos2d or by searching this forum.
There is an RSS Feed link right below the last post on the right. Never used it though since I visit often.
I'm interested to see how my app runs on a real iPAD. It's kindof fun /scary to submit without ever seeing it on a real device. :P
You must log in to post.